pub fn safe_byte_index(s: &str, pos: usize) -> usize
Find the largest valid char boundary <= pos in s.
pos
s