12 #ifndef parserutils_charset_utf16_h_ 13 #define parserutils_charset_utf16_h_ 25 size_t len, uint32_t *ucs4,
size_t *clen);
27 uint8_t *s,
size_t *
len);
35 uint32_t off, uint32_t *prevoff);
37 uint32_t
len, uint32_t off, uint32_t *nextoff);
40 uint32_t
len, uint32_t off, uint32_t *nextoff);
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.
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.
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.
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.
parserutils_error parserutils_charset_utf16_prev(const uint8_t *s, uint32_t off, uint32_t *prevoff)
Find previous legal UTF-16 char in string.
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.
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.