Computes the length of the string in characters, not including
the terminating nul character. If the
max‘th byte falls in the
middle of a character, the last (partial) character is not counted.
Pointer to the start of a UTF-8 encoded string.
The data is owned by the caller of the function. The value is a NUL terminated UTF-8 string.
The maximum number of bytes to examine. If
maxis less than 0, then the string is assumed to be nul-terminated. If
pwill not be examined and may be
maxis greater than 0, up to
maxbytes are examined.