Skip to main content

truncate_to

Function truncate_to 

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

Truncates a string to a max length, appending an ellipsis if truncated.