parse_next_utf8_or_escaped

Function parse_next_utf8_or_escaped 

Source
pub fn parse_next_utf8_or_escaped(
    utf8: &[u8],
    additional_escape_map: &HashMap<u8, TCodepoint>,
) -> (TCodepoint, i32)
Expand description

Parse the first codepoint from utf8, transparently decoding an escape sequence when the input starts with \.

Returns (codepoint, bytes_consumed). On invalid input returns (INVALID_UTF8, 0) or (INVALID_ESCAPE, 0) per the failure mode — faithful to C++ ParseNextUTF8OrEscaped.