Next: Length of a NUL terminated Unicode string, Up: Elementary string functions on NUL terminated strings [Contents][Index]
The following functions inspect and return details about the first character in a Unicode string.
Returns the length (number of units) of the first character in s. Returns 0 if it is the NUL character. Returns -1 upon failure.
Returns the length (number of units) of the first character in s,
putting its ucs4_t
representation in *puc
. Returns 0
if it is the NUL character. Returns -1 upon failure.
Forward iteration step. Advances the pointer past the next character,
or returns NULL if the end of the string has been reached. Puts the
character’s ucs4_t
representation in *puc
.
The following function inspects and returns details about the previous character in a Unicode string.
Backward iteration step. Advances the pointer to point to the previous
character (the one that ends at s
), or returns NULL if the
beginning of the string (specified by start
) had been reached.
Puts the character’s ucs4_t
representation in *puc
.
Note that this function works only on well-formed Unicode strings.