Add iswide() and width() method for UserString according as the

addition to unicode objects.
This commit is contained in:
Hye-Shik Chang 2004-06-04 03:18:12 +00:00
parent 0701bd64aa
commit 5f5125997b
3 changed files with 31 additions and 1 deletions

View file

@ -126,6 +126,10 @@ class UserString:
def upper(self): return self.__class__(self.data.upper())
def zfill(self, width): return self.__class__(self.data.zfill(width))
# the following methods are defined for unicode objects only:
def iswide(self): return self.data.iswide()
def width(self): return self.data.width()
class MutableString(UserString):
"""mutable string objects