Formatting
- _wrap_ansi_text(text, width)[source]
Wrap text that contains ANSI escape sequences.
This function strips ANSI codes for width calculation but preserves them in the output.
- Return type:
- truncate(text, placeholder='')[source]
Truncates the input string to fit the terminal width.