g_utf8_validate_len (
  const gchar* str,
  gsize max_len,
  const gchar** end


Validates UTF-8 encoded text.

As with g_utf8_validate(), but max_len must be set, and hence this function will always return FALSE if any of the bytes of str are nul.

Available since:2.60


str An array of guint8

A pointer to character data.

 The length of the array is specified in the max_len argument.
 The data is owned by the caller of the function.
max_len gsize

Max bytes to validate.

end const gchar**

Return location for end of valid data.

 The argument will be set by the function.
 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

Returns: gboolean

TRUE if the text was valid UTF-8