function new_bytestring(string: ByteArray): GLib.Variant {
    // Gjs wrapper for g_variant_new_bytestring()

Creates an array-of-bytes GLib.Variant with the contents of string. This function is just like GLib.Variant.new_string except that the string need not be valid utf8.

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

Since 2.26


a normal nul-terminated string in no particular encoding


a floating reference to a new bytestring GLib.Variant instance