Add endswith to GapString

This commit is contained in:
Neale Pickett 2009-04-07 08:24:04 -06:00
parent 50fe220ca1
commit 57aca02bd1
1 changed files with 3 additions and 0 deletions

View File

@ -178,6 +178,9 @@ class GapString:
def startswith(self, what):
return (what == str(self[:len(what)]))
def endswith(self, what):
return (what == str(self[-len(what):]))
if __name__ == '__main__':
gs = GapString()