Skip to main content

byte_index

Function byte_index 

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

The byte offset of UTF-16 index units in text: the start of the first character at or after it, or the end of the text.