encoding_rs::mem

Function utf16_valid_up_to

source
pub fn utf16_valid_up_to(buffer: &[u16]) -> usize
Expand description

Returns the index of the first unpaired surrogate or, if the input is valid UTF-16 in its entirety, the length of the input.