Next: Conversions, Previous: Character sizes, Up: UTF-8 [Contents][Index]
A data type for iterating over a string of UTF-8 characters. Defined as:
struct utf8_iterator { char *string; char *curptr; unsigned curwidth; };
When iterating over characters in string, curptr
points to the
current character, and curwidth
holds its length in bytes.
Returns ‘true’ if itr points to a ASCII character.
Returns ‘true’ if itr reached end of the input string.
Initializes itr for iterating over the string str.
On success, positions itr.curptr
to the next character
from the input string, sets itr.curwidth
to the length of
that character in bytes, and returns ‘0’. If str is an
empty string, returns ‘1’.
Positions itr.curptr
to the next character from the input
string. Sets itr.curwidth
to the length of that
character in bytes.