egui::text_selection::text_cursor_state

Function byte_index_from_char_index

Source
pub fn byte_index_from_char_index(s: &str, char_index: usize) -> usize