The following function is available to verify the integrity of a Unicode string.
const uint8_t * u8_check (const uint8_t *s, size_t n) ¶const uint16_t * u16_check (const uint16_t *s, size_t n) ¶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.