pub fn truncate_to_width(s: &str, max_width: usize) -> String
Truncate string to specified visual width, preserving color codes