Function

GLibutf8_find_next_char

Declaration [src]

gchar*
g_utf8_find_next_char (
  const gchar* p,
  const gchar* end
)

Description [src]

Finds the start of the next UTF-8 character in the string after p.

p does not have to be at the beginning of a UTF-8 character. No check is made to see if the character found is actually valid other than it starts with an appropriate byte.

If end is NULL, the return value will never be NULL: if the end of the string is reached, a pointer to the terminating nul byte is returned. If end is non-NULL, the return value will be NULL if the end of the string is reached.

Parameters

p

Type: const gchar*

A pointer to a position within a UTF-8 encoded string.

The data is owned by the caller of the function.
The value is a NUL terminated UTF-8 string.
end

Type: const gchar*

A pointer to the byte following the end of the string, or NULL to indicate that the string is nul-terminated.

The argument can be NULL.
The data is owned by the caller of the function.
The value is a NUL terminated UTF-8 string.

Return value

Type: gchar*

A pointer to the found character or NULL if end is set and is reached.

The data is owned by the called function.
The return value can be NULL.
The value is a NUL terminated UTF-8 string.