Module unescape

Module unescape 

Source
Expand description

Utilities for validating string and char literals and turning them into values they represent.

Enums§

CStrUnit
A unit within CStr. Must not be a nul character.
EscapeError
Errors and warnings that can occur during string unescaping.
Mode
What kind of literal do we parse.

Functions§

byte_from_char
unescape_byte
Takes a contents of a byte literal (without quotes), and returns an unescaped byte or an error.
unescape_c_string
unescape_char
Takes a contents of a char literal (without quotes), and returns an unescaped char or an error.
unescape_literal
Takes a contents of a literal (without quotes) and produces a sequence of escaped characters or errors. Values are returned through invoking of the provided callback.