Next: , Up: Elementary Unicode string functions <unistr.h>   [Contents][Index]

4.1 Elementary string checks

The following function is available to verify the integrity of a Unicode string.

Function: const uint8_t * u8_check (const uint8_t *s, size_t n)
Function: const uint16_t * u16_check (const uint16_t *s, size_t n)
Function: const uint32_t * u32_check (const uint32_t *s, size_t n)

This function checks whether a Unicode string is well-formed. It returns NULL if valid, or a pointer to the first invalid unit otherwise.