From 57aca02bd137eb61afb06d70ce868c04687b4a9b Mon Sep 17 00:00:00 2001 From: Neale Pickett Date: Tue, 7 Apr 2009 08:24:04 -0600 Subject: [PATCH] Add endswith to GapString --- gapstr.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gapstr.py b/gapstr.py index b51b968..87563d0 100755 --- a/gapstr.py +++ b/gapstr.py @@ -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()