Skip to main content

truncate_str

Function truncate_str 

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

Truncate to at most limit bytes without splitting a UTF-8 character.