parse_next_escaped

Function parse_next_escaped 

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

Parse one escape sequence at the start of data (which must begin with \).

Returns (codepoint, bytes_consumed). Supports the C-escape table, additional_escape_map (checked first), arbitrary-length \xHH…, fixed \uHHHH, and fixed \UHHHHHHHH. On any malformed input returns (INVALID_ESCAPE, 0) — faithful to C++ ParseNextEscaped.