[][src]Function encoding_c_mem::encoding_mem_utf8_latin1_up_to

#[no_mangle]
pub unsafe extern "C" fn encoding_mem_utf8_latin1_up_to(
    buffer: *const u8,
    len: usize
) -> usize

Returns the index of first byte that starts an invalid byte sequence or a non-Latin1 byte sequence, or the length of the string if there are neither.

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.)