determine_utf_8e_128_error_len

Function determine_utf_8e_128_error_len 

Source
pub fn determine_utf_8e_128_error_len(slice: &[u8]) -> Option<usize>
Expand description

Computes the maximal-subpart error length for an invalid or incomplete legacy UTF-8e-128 (DcUtf, f89) byte slice.

Returns Some(n) (n >= 1) when slice[..n] is the longest initial subsequence that can prefix a canonical DcUtf sequence (or Some(1) if slice[0] cannot start any canonical sequence), or None when the entire slice is a valid incomplete prefix of a canonical DcUtf sequence (truncated at the end of slice).