pub fn byte_to_char_pos(text: &str, byte_pos: usize) -> usize
Convert byte position to character position in a UTF-8 string