pub(crate) fn str_chars_to_bytes(s: &str, char_pos: usize) -> usize {
    // s.char_indices().nth(char_pos).map_or_else(
    //     || s.len(),
    //     |(i, _)| i
    // )

    ropey::str_utils::char_to_byte_idx(s, char_pos)
}
// Get the byte offset after char_pos utf8 characters
Get the byte offset after char_pos utf8 characters
Get the byte offset after char_pos utf8 characters
pub(crate) fn str_chars_to_bytes(s: &str, char_pos: usize) -> usize {
    // s.char_indices().nth(char_pos).map_or_else(
    //     || s.len(),
    //     |(i, _)| i
    // )
    ropey::str_utils::char_to_byte_idx(s, char_pos)
}
pub ( crate ) fn str_chars_to_bytes ( s : & str , char_pos : usize ) -> usize { // s.char_indices().nth(char_pos).map_or_else( //     || s.len(), //     |(i, _)| i // ) ropey :: str_utils :: char_to_byte_idx ( s , char_pos ) }
Get the byte offset after char_pos utf8 characters
Get the byte offset after char_pos utf8 characters
s
&str
char_pos
usize