Skip to main content

truncate_visual

Function truncate_visual 

Source
pub fn truncate_visual(s: &str, max_cols: usize) -> String
Expand description

Truncate a string to at most max_cols terminal columns, preserving ANSI escape sequences and respecting wide characters.