mirror of https://github.com/dirtbags/netarch.git
Add endswith to GapString
This commit is contained in:
parent
50fe220ca1
commit
57aca02bd1
|
@ -178,6 +178,9 @@ class GapString:
|
||||||
def startswith(self, what):
|
def startswith(self, what):
|
||||||
return (what == str(self[:len(what)]))
|
return (what == str(self[:len(what)]))
|
||||||
|
|
||||||
|
def endswith(self, what):
|
||||||
|
return (what == str(self[-len(what):]))
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
gs = GapString()
|
gs = GapString()
|
||||||
|
|
Loading…
Reference in New Issue