#[no_mangle]
pub unsafe extern "C" fn encoding_mem_str_latin1_up_to(
buffer: *const u8,
len: usize,
) -> usize
Expand description
Returns the index of first byte that starts a non-Latin1 byte sequence, or the length of the string if there are none.
§Undefined behavior
UB ensues if buffer
and buffer_len
don’t designate a valid memory block,
if buffer
is NULL
, or if the memory block does not contain valid UTF-8.
(If buffer_len
is 0
, buffer
may be bogus but still has to be non-NULL
and aligned.)