pub fn byte_index(text: &str, units: usize) -> usize
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.
units
text