Skip to main content

utf16_index

Function utf16_index 

Source
pub fn utf16_index(text: &str, byte: usize) -> usize
Expand description

The UTF-16 index of byte offset byte in text, as JavaScript indexes strings; an offset inside a character counts from its start.