pub fn truncate_utf8_by_bytes(input: &str, max_bytes: usize) -> StringExpand description
Truncate a UTF-8 string to at most max_bytes UTF-8 bytes, never splitting a codepoint.
If truncated, appends an ASCII ellipsis marker and a short suffix explaining truncation.