pub fn safe_head(s: &str, max_bytes: usize) -> &str
Returns the longest prefix of s that is at most max_bytes long and ends on a UTF-8 boundary.
s
max_bytes