12 #ifndef parserutils_charset_utf8_h_ 13 #define parserutils_charset_utf8_h_ 25 uint32_t *ucs4,
size_t *clen);
37 uint32_t off, uint32_t *nextoff);
40 uint32_t
len, uint32_t off, uint32_t *nextoff);
parserutils_error parserutils_charset_utf8_from_ucs4(uint32_t ucs4, uint8_t **s, size_t *len)
Convert a single UCS-4 character into a UTF-8 multibyte sequence.
parserutils_error parserutils_charset_utf8_next(const uint8_t *s, uint32_t len, uint32_t off, uint32_t *nextoff)
Find next legal UTF-8 char in string.
parserutils_error parserutils_charset_utf8_char_byte_length(const uint8_t *s, size_t *len)
Calculate the length (in bytes) of a UTF-8 character.
parserutils_error parserutils_charset_utf8_prev(const uint8_t *s, uint32_t off, uint32_t *prevoff)
Find previous legal UTF-8 char in string.
parserutils_error parserutils_charset_utf8_length(const uint8_t *s, size_t max, size_t *len)
Calculate the length (in characters) of a bounded UTF-8 string.
parserutils_error parserutils_charset_utf8_to_ucs4(const uint8_t *s, size_t len, uint32_t *ucs4, size_t *clen)
Convert a UTF-8 multibyte sequence into a single UCS-4 character.
parserutils_error parserutils_charset_utf8_next_paranoid(const uint8_t *s, uint32_t len, uint32_t off, uint32_t *nextoff)
Find next legal UTF-8 char in string.