diff options
author | Hye-Shik Chang <hyeshik@gmail.com> | 2004-06-04 03:18:12 (GMT) |
---|---|---|
committer | Hye-Shik Chang <hyeshik@gmail.com> | 2004-06-04 03:18:12 (GMT) |
commit | 5f5125997beba34f79faa0751c6fa1fa74d97ae2 (patch) | |
tree | 1042d481bc2d29356afc29dd7f16c81c7aee7b32 /Lib/UserString.py | |
parent | 0701bd64aaf5eacafa7b18f0e67273ed75943a8b (diff) | |
download | cpython-5f5125997beba34f79faa0751c6fa1fa74d97ae2.zip cpython-5f5125997beba34f79faa0751c6fa1fa74d97ae2.tar.gz cpython-5f5125997beba34f79faa0751c6fa1fa74d97ae2.tar.bz2 |
Add iswide() and width() method for UserString according as the
addition to unicode objects.
Diffstat (limited to 'Lib/UserString.py')
-rwxr-xr-x | Lib/UserString.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/UserString.py b/Lib/UserString.py index e8e0fed..914f3ce 100755 --- a/Lib/UserString.py +++ b/Lib/UserString.py @@ -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 |