pub fn floor_char_boundary(s: &str, max_bytes: usize) -> usize
Largest byte index <= max_bytes that is a char boundary of s.
<= max_bytes
char
s
O(1): a UTF-8 sequence is at most 4 bytes, so the nearest boundary is at most 3 bytes back.
O(1)