Function

GLibVariantnew_bytestring

Declaration

GVariant*
g_variant_new_bytestring (
  const gchar* string
)

Description

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 An array of guint8
 

A normal nul-terminated string in no particular encoding.

 The data is owned by the caller of the function.

Return value

Returns: GVariant
 

A floating reference to a new bytestring GVariant instance.

 The data is owned by the called function.