Skip to main content

truncate

Function truncate 

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

Truncates a string to the given maximum length, appending a marker if truncation occurred.