#[unsafe(no_mangle)]pub unsafe extern "C" fn encoding_mem_is_utf8_latin1(
buffer: *const u8,
len: usize,
) -> boolExpand description
Checks whether the buffer is valid UTF-8 representing only code points less than or equal to U+00FF.
Fails fast. (I.e. returns before having read the whole buffer if UTF-8 invalidity or code points above U+00FF are discovered.
§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.)