Returns the real on-screen length of a string which may contain ANSI control codes and wide chars.
(data)
| 376 | |
| 377 | |
| 378 | def disp_len(data): |
| 379 | """ |
| 380 | Returns the real on-screen length of a string which may contain |
| 381 | ANSI control codes and wide chars. |
| 382 | """ |
| 383 | return _text_width(RE_ANSI.sub('', data)) |
| 384 | |
| 385 | |
| 386 | def disp_trim(data, length): |
no test coverage detected