GLib.Variant.new_bytestring
Description: Reference for GLib.Variant.new_bytestring

### Function

# GLib Variantnew_bytestring

since: 2.26

#### Declaration [src]

    GVariant*
    g_variant_new_bytestring (
      const gchar* string
    )

#### Description [src]

Creates an array-of-bytes `GVariant` with the contents of `string`. This function is just like `g_variant_new_string()` except that the string need not be valid UTF-8.

The nul terminator character at the end of the string is stored in the array.

Available since: 2.26

#### Parameters

`string`

  Type: An array of `guint8`

  A normal nul-terminated string in no particular encoding.

  The array must be `NULL`-terminated.
  The data is owned by the caller of the function.

#### Return value

Type: `GVariant`

A floating reference to a new bytestring `GVariant` instance.

The data is owned by the called function.