pub fn utf16_to_byte_offset(s: &str, units: usize) -> usize
Byte offset of the units-th UTF-16 code unit in s (clamped to the end, and moved forward to a char boundary if it falls inside a surrogate pair).
units
s