Next: , Previous: , Up: Elementary string functions on NUL terminated strings   [Contents][Index]


4.5.2 Length of a NUL terminated Unicode string

The following functions determine the length of a Unicode string.

Function: size_t u8_strlen (const uint8_t *s)
Function: size_t u16_strlen (const uint16_t *s)
Function: size_t u32_strlen (const uint32_t *s)

Returns the number of units in s.

This function is similar to strlen and wcslen, except that it operates on Unicode strings.

Function: size_t u8_strnlen (const uint8_t *s, size_t maxlen)
Function: size_t u16_strnlen (const uint16_t *s, size_t maxlen)
Function: size_t u32_strnlen (const uint32_t *s, size_t maxlen)

Returns the number of units in s, but at most maxlen.

This function is similar to strnlen and wcsnlen, except that it operates on Unicode strings.