pub fn truncate_utf8(text: &mut String, max_bytes: usize) -> boolExpand description
Truncate text so that its UTF-8 encoded length is at most max_bytes,
always keeping the result on a valid UTF-8 character boundary.
Returns true when truncation occurred.