Variant.take_string


Description:

[ Version ( since = "2.38" ) ]
public Variant.take_string (owned string str)

Creates a string Variant with the contents of string.

string must be valid UTF-8, and must not be null. To encode potentially- null strings, use this with Variant.maybe.

This function consumes string. g_free will be called on string when it is no longer required.

You must not modify or access string in any other way after passing it to this function. It is even possible that string is immediately freed.

Parameters:

string

a normal UTF-8 nul-terminated string

Returns:

a floating reference to a new string Variant instance