dup


Description:

[ CCode ( cname = "g_strdup" ) ]
public string dup ()

Example: Copy a string:

public static int main (string[] args) {
string my_str = "Reversed the polarity of the neutron flow.";
string my_dup = my_str.dup ();
// Output: ``Reversed the polarity of the neutron flow.``
print ("%s\n", my_dup);
return 0;
}

valac --pkg glib-2.0 string.dup.vala