truncate_to_width

Function truncate_to_width 

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

Truncate string to specified visual width, preserving color codes