GLib.environ_getenv
function environ_getenv(envp: Array(String), variable: String): String { // Gjs wrapper for g_environ_getenv() }
Returns the value of the environment variable variable in the provided list envp.
Since 2.32
- envp
an environment list (eg, as returned from GLib.get_environ), or null for an empty environment list
- variable
the environment variable to get, in the GLib file name encoding
- Returns
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.