### Method

# GLib Variant dup_bytestring

since: 2.26

#### Declaration [src]

    gchar*
    g_variant_dup_bytestring (
      GVariant* value,
      gsize* length
    )

#### Description [src]

Similar to `g_variant_get_bytestring()` except that instead of returning a constant string, the string is duplicated.

The return value must be freed using g_free().

Available since: 2.26

#### Parameters

`length`

  Type: `gsize*`

  A pointer to a #gsize, to store the length (not including the nul terminator).

  The argument will be set by the function.
  The argument can be `NULL`.

#### Return value

Type: An array of `guint8`

         a newly allocated string.

The array is `NULL`-terminated.
The length of the array is in the `length` argument.
The caller of the method takes ownership of the returned data, and is responsible for freeing it.