mirror of https://github.com/python/cpython
Add rsplit method for UserString, too.
(Spotted by Raymond Hettinger)
This commit is contained in:
parent
c0d49d82de
commit
eebb641f23
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue