[][src]Function encoding_c_mem::encoding_mem_ensure_utf16_validity

#[no_mangle]
pub unsafe extern "C" fn encoding_mem_ensure_utf16_validity(
    buffer: *mut u16,
    len: usize
)

Replaces unpaired surrogates in the input with the REPLACEMENT CHARACTER.

Undefined behavior

UB ensues if buffer and buffer_len don't designate a valid memory block or if buffer is NULL. (If buffer_len is 0, buffer may be bogus but still has to be non-NULL and aligned.)