Add rsplit method for UserString, too.

(Spotted by Raymond Hettinger)
This commit is contained in:
Hye-Shik Chang 2003-12-15 19:46:09 +00:00
parent c0d49d82de
commit eebb641f23
1 changed files with 2 additions and 0 deletions

View File

@ -113,6 +113,8 @@ class UserString:
def rstrip(self, chars=None): return self.__class__(self.data.rstrip(chars))
def split(self, sep=None, maxsplit=-1):
return self.data.split(sep, maxsplit)
def rsplit(self, sep=None, maxsplit=-1):
return self.data.rsplit(sep, maxsplit)
def splitlines(self, keepends=0): return self.data.splitlines(keepends)
def startswith(self, prefix, start=0, end=sys.maxint):
return self.data.startswith(prefix, start, end)