class TextWrapper(textwrap.TextWrapper):
Method | _break_word |
_break_word(word : string, space_left : int) -> (string, string) |
Method | _handle_long_word |
_handle_long_word(chunks : [string], cur_line : [string], cur_len : int, width : int) |
Method | _split |
_split(text : string) -> [string] |
Method | _wrap_chunks |
_wrap_chunks(chunks : [string]) -> [string] |
Class Variable | wordsep_re |
Undocumented |
_break_word(word : string, space_left : int) -> (string, string)
Break line by unicode width instead of len(word).
Parameters | |
word:str | Undocumented |
space_left:int | Undocumented |
Returns | |
Tuple[ | Undocumented |
Override original method for using self._break_word() instead of slice.
Parameters | |
reversed_chunks:List[ | Undocumented |
cur_line:List[ | Undocumented |
cur_len:int | Undocumented |
width:int | Undocumented |
_split(text : string) -> [string]
Override original method that only split by 'wordsep_re'. This '_split' splits wide-characters into chunks by one character.
Parameters | |
text:str | Undocumented |
Returns | |
List[ | Undocumented |