parse_next_utf8

Function parse_next_utf8 

Source
pub fn parse_next_utf8(utf8: &[u8]) -> (TCodepoint, i32)
Expand description

Decode the first codepoint from a UTF-8 byte slice.

Returns (codepoint, bytes_consumed). On invalid UTF-8 (bad first byte, missing/invalid continuation byte, or truncated input) returns (INVALID_UTF8, 0) — faithful to C++ ParseNextUTF8.