Module utf16

Source
Expand description

Index by utf16 code units.

Functionsยง

count
Counts the utf16 code units that would be in a string slice if it were encoded as utf16.
count_surrogates
Counts the utf16 surrogate pairs that would be in a string slice if it were encoded as utf16.
from_byte_idx
Converts from byte-index to utf16-code-unit-index in a string slice.
to_byte_idx
Converts from utf16-code-unit-index to byte-index in a string slice.