set_variable


Description:

public string[] set_variable (owned string[]? envp, string variable, string value, bool overwrite = true)

Sets the environment variable variable in the provided list envp to value.

Parameters:

envp

an environment list that can be freed using strfreev (e.g., as returned from @get), or null for an empty environment list

variable

the environment variable to set, must not contain '='

value

the value for to set the variable to

overwrite

whether to change the variable if it already exists

Returns:

the updated environment list. Free it using strfreev.


Namespace: GLib.Environ
Package: glib-2.0