pub fn truncate_chars(s: &mut String, max_chars: usize)Expand description
Truncates a String to at most max_chars characters.
If the string has fewer than max_chars characters, this is a no-op.
Assumption: data in input distribution is almost always shorter than
max_chars.