str_indices::utf16

Function count

Source
pub fn count(text: &str) -> usize
Expand description

Counts the utf16 code units that would be in a string slice if it were encoded as utf16.

Runs in O(N) time.