Skip to main content

utf16_code_units

Function utf16_code_units 

Source
pub fn utf16_code_units(s: &str) -> u32
Expand description

Count the UTF-16 code units in a string. Needed for LSP Position.character calculations, which use UTF-16 offsets.