Commit a159683e authored by Eckhart Arnold's avatar Eckhart Arnold
Browse files

Ticket 132: Belege ohne Stellenangabe jetzt erlaubt, wenn dort der Zusatz...

Ticket 132: Belege ohne Stellenangabe jetzt erlaubt, wenn dort der Zusatz {sim. ibid.} als Platzhalter steht
parent 8a4b41ad
......@@ -164,13 +164,16 @@ class StringView: # collections.abc.Sized
@cython.locals(_len=cython.int)
def __eq__(self, other) -> bool:
"""PERFORMANCE WARNING: This creates copies of the compared string-slices!"""
"""PERFORMANCE WARNING: This create copies of the compared string-slices!"""
# one string copy could be avoided by using find...
# return len(other) == self._len and str(self) == str(other)
_len = self._len
if len(other) == _len:
if _len == 0:
return True
if isinstance(other, StringView) \
and self._text is other._text and self._begin == other._begin:
return True
_fullstring = self._fullstring # type: str
if _fullstring:
return _fullstring == str(other)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment