pub fn truncate_str(input: &str, max_len: usize) -> StringExpand description
Truncate input to at most max_len bytes, snapping back to the nearest
UTF-8 character boundary so multi-byte sequences are never split.
When the input is longer than max_len, an ellipsis … is appended.