Skip to main content

truncate_chars

Function truncate_chars 

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

Truncate string to max characters (not bytes). Useful for display purposes where visual length matters.