Skip to main content

truncate_with_suffix

Function truncate_with_suffix 

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

Truncate string to max bytes with “…” suffix. Respects UTF-8 boundaries.