qnet.utils.unicode module¶
Utils for working with unicode strings
Summary¶
Functions:
grapheme_len |
Number of graphemes in text |
ljust |
Left-justify text to a total of width |
rjust |
Right-justify text for a total of width graphemes |
Reference¶
-
qnet.utils.unicode.
grapheme_len
(text)[source]¶ Number of graphemes in text
- This is the length of the text when printed::
>>> s = 'Â' >>> len(s) 2 >>> grapheme_len(s) 1