Skip to main content

cap

Function cap 

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

Truncate to a char cap without splitting a UTF-8 boundary.