Expand description
Module for string encoding and decoding.
Structs§
- String
Encoder - Provide a configurable string encoder. This takes strings and produces an encoded version of
the string. This complements the
crate::strings::StringParser
. - String
Parser - Implement parsing of strings.
Enums§
- Encoding
Method - Determine how Unicode characters that require encoding should be handled. If ASCII encoding is enabled, this only applies to characters that need encoding and are outside the ASCII range.
- Encoding
Standard - The standard used to determine which characters to encode as escapes.
- Escape
Type - Define the different escape types. These are used to interpret escape sequences found in strings and to determine how escapes are used when encoding.
- Illegal
Unicode Protocol - How to handle parsing an invalid Unicode hexadecimal escape. This also applies to the escapes of a surrogate pair when surrogate pairs are not allowed.
- String
Standard - These are the string standards that are implemented for the string parser and encoder. These select a “bundle” of options at once to configure how strings are parsed or encoded.
- Unknown
Escape Protocol - How to handle parsing unknown or invalid escapes.
Constants§
- UCD
- The Unicode database.
Functions§
- get_ucd
- Construct the UCD and return it. This is a relatively costly operation and you should only do it once. Once you have done this you can keep it around and use it to initialize string parsers that handle named Unicode escapes. It is not needed otherwise.