Function encoding_c::encoding_utf8_valid_up_to
[−]
[src]
#[no_mangle]pub unsafe extern fn encoding_utf8_valid_up_to(buffer: *const u8,
buffer_len: usize)
-> usize
Validates UTF-8.
Returns the index of the first byte that makes the input malformed as
UTF-8 or buffer_len if buffer is entirely valid.
Undefined behavior
UB ensues if buffer and buffer_len don't designate a valid memory block.