|
XenevaOS
|

Functions | |
| parserutils_error | parserutils_charset_utf16_to_ucs4 (const uint8_t *s, size_t len, uint32_t *ucs4, size_t *clen) |
| parserutils_error | parserutils_charset_utf16_from_ucs4 (uint32_t ucs4, uint8_t *s, size_t *len) |
| parserutils_error | parserutils_charset_utf16_length (const uint8_t *s, size_t max, size_t *len) |
| parserutils_error | parserutils_charset_utf16_char_byte_length (const uint8_t *s, size_t *len) |
| parserutils_error | parserutils_charset_utf16_prev (const uint8_t *s, uint32_t off, uint32_t *prevoff) |
| parserutils_error | parserutils_charset_utf16_next (const uint8_t *s, uint32_t len, uint32_t off, uint32_t *nextoff) |
| parserutils_error | parserutils_charset_utf16_next_paranoid (const uint8_t *s, uint32_t len, uint32_t off, uint32_t *nextoff) |
UTF-16 manipulation functions (implementation).
| parserutils_error parserutils_charset_utf16_char_byte_length | ( | const uint8_t * | s, |
| size_t * | len | ||
| ) |
Calculate the length (in bytes) of a UTF-16 character
| s | Pointer to start of character |
| len | Pointer to location to receive length |
| parserutils_error parserutils_charset_utf16_from_ucs4 | ( | uint32_t | ucs4, |
| uint8_t * | s, | ||
| size_t * | len | ||
| ) |
Convert a single UCS-4 character into a UTF-16 sequence
| ucs4 | The character to process (0 <= c <= 0x7FFFFFFF) (host endian) |
| s | Pointer to 4 byte long output buffer |
| len | Pointer to location to receive length of multibyte sequence |
| parserutils_error parserutils_charset_utf16_length | ( | const uint8_t * | s, |
| size_t | max, | ||
| size_t * | len | ||
| ) |
Calculate the length (in characters) of a bounded UTF-16 string
| s | The string |
| max | Maximum length |
| len | Pointer to location to receive length of string |
| parserutils_error parserutils_charset_utf16_next | ( | const uint8_t * | s, |
| uint32_t | len, | ||
| uint32_t | off, | ||
| uint32_t * | nextoff | ||
| ) |
Find next legal UTF-16 char in string
| s | The string (assumed valid) |
| len | Maximum offset in string |
| off | Offset in the string to start at |
| nextoff | Pointer to location to receive offset of first byte of next legal character |
| parserutils_error parserutils_charset_utf16_next_paranoid | ( | const uint8_t * | s, |
| uint32_t | len, | ||
| uint32_t | off, | ||
| uint32_t * | nextoff | ||
| ) |
Find next legal UTF-16 char in string
| s | The string (assumed to be of dubious validity) |
| len | Maximum offset in string |
| off | Offset in the string to start at |
| nextoff | Pointer to location to receive offset of first byte of next legal character |
| parserutils_error parserutils_charset_utf16_prev | ( | const uint8_t * | s, |
| uint32_t | off, | ||
| uint32_t * | prevoff | ||
| ) |
Find previous legal UTF-16 char in string
| s | The string |
| off | Offset in the string to start at |
| prevoff | Pointer to location to receive offset of first byte of previous legal character |
| parserutils_error parserutils_charset_utf16_to_ucs4 | ( | const uint8_t * | s, |
| size_t | len, | ||
| uint32_t * | ucs4, | ||
| size_t * | clen | ||
| ) |
Convert a UTF-16 sequence into a single UCS-4 character
| s | The sequence to process |
| len | Length of sequence in bytes |
| ucs4 | Pointer to location to receive UCS-4 character (host endian) |
| clen | Pointer to location to receive byte length of UTF-16 sequence |