Function read_escape

Function Documentation

usize read_escape(string src, rune *dest)

Take an unescaped UTF-8 string, where the start of the string is pointing to the character right after the backslash. If this character is a U, then max eight (8) hexadecimal digits are expected to succeed it, otherwise a u is expected, where max four (4) hexdecimal digits are to succeed it. The resulting rune is stored in dest.

Return

How many bytes read as part of parsing (including u/U). Returns 0 if escape is invalid.

Parameters
  • [in] src: String pointing to char after backslash.

  • [out] dest: Pointer to location where resulting rune is to be stored.