Function
GLibutf8_strlen
since: 2.0
Description
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.
Available since: 2.0
Parameters
p-
Type:
const gchar*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. max-
Type:
gssizeThe maximum number of bytes to examine. If
maxis less than 0, then the string is assumed to be nul-terminated. Ifmaxis 0,pwill not be examined and may beNULL. Ifmaxis greater than 0, up tomaxbytes are examined.