Skip to main content

byte_index

Function byte_index 

Source
pub fn byte_index(text: &str, utf16: usize) -> Option<usize>
Expand description

JavaScript string index (UTF-16 code units) -> byte offset, or None inside a character.