Skip to main content

truncate_str

Function truncate_str 

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

Truncate a string to at most max bytes at a valid UTF-8 boundary.