Util.environGetenv

Returns the value of the environment variable variable in the provided list envp. The name and value are in the GLib file name encoding. On UNIX, this means the actual bytes which might or might not be in some consistent character set and encoding. On Windows, it is in UTF-8. On Windows, in case the environment variable's value contains references to other environment variables, they are expanded. Since 2.32

class Util
static
string
environGetenv
(
string[] envp
,
string variable
)

Parameters

envp string[]

an environment list (eg, as returned from g_get_environ()), or NULL for an empty environment list. [allow-none][array zero-terminated=1][transfer none]

variable string

the environment variable to get, in the GLib file name encoding

Return Value

Type: string

the value of the environment variable, or NULL if the environment variable is not set in envp. The returned string is owned by envp, and will be freed if variable is set or unset again.

Meta