pub fn truncate_chars(str: &str, max: usize) -> &str
Shortens a string to at most max characters.
max
Characters are Unicode scalar values, so the cut never splits one. A string already within the limit is returned whole.