Function

GLib-2.0GLibutf8_to_ucs4

  • Convert a string from UTF-8 to a 32-bit fixed width representation as UCS-4.

    A trailing nul character (U+0000) will be added to the string after the converted text.

    Parameters

    • str: string

      a UTF-8 encoded string

    • len: number

      the maximum length of str to use, in bytes. If len is negative, then the string is nul-terminated.

    Returns [string, number, number]

    a pointer to a newly allocated UCS-4 string. This value must be freed with GLib.free.