Previous: Searching for a character in a Unicode string, Up: Elementary string functions [Contents][Index]
The following function counts the number of Unicode characters.
size_t u8_mbsnlen (const uint8_t *s, size_t n) ¶ size_t u16_mbsnlen (const uint16_t *s, size_t n) ¶ size_t u32_mbsnlen (const uint32_t *s, size_t n) ¶ Counts and returns the number of Unicode characters in the n units from s.
This function is similar to the gnulib function mbsnlen, except that
it operates on Unicode strings.