Function

GLib-2.0GLibutf8_validate_lenSince 2.60

  • Validates UTF-8 encoded text.

    As with GLib.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.

    Parameters

    • str: string | Uint8Array<ArrayBufferLike>

      a pointer to character data

    Returns [boolean, Uint8Array<ArrayBufferLike>]

    TRUE if the text was valid UTF-8

    2.60