pub fn truncate_utf8_to_max_bytes(value: &str, max_len: usize) -> String
Truncates a string to at most max_len bytes without splitting a UTF-8 code point.
max_len