Skip to main content

truncate_str

Function truncate_str 

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

Truncate a string to max_len characters, appending “…” if truncated.