Previous: , Up: Elementary string functions   [Contents][Index]


4.3.6 Counting the characters in a Unicode string

The following function counts the number of Unicode characters.

Function: size_t u8_mbsnlen (const uint8_t *s, size_t n)
Function: size_t u16_mbsnlen (const uint16_t *s, size_t n)
Function: 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.