finesse.utilities.tables.Table.get_visible_length¶
- Table.get_visible_length(text)[source]¶
Get the visible length of the string.
- Parameters
- textstr
- Returns
- int
The number of non combining characters after removing ANSI escape sequences.
Notes
Using code from https://stackoverflow.com/questions/14693701/how-can- i-remove-the-ansi-escape-sequences-from-a-string-in-python and https://stackoverflow.com/questions/33351599/how-do-i-get-the- visible-length-of-a-combining-unicode-string-in-python