#[no_mangle]
pub unsafe extern "C" fn encoding_mem_ensure_utf16_validity(
buffer: *mut u16,
len: usize,
)
Expand description
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.)