Package: glib

Function g-getenv

Lambda List

g-getenv (variable)

Arguments

variable -- a string with the environment variable to get, in the GLib file name encoding

Return Value

A string with the value of the environment variable, or nil if the environment variable is not found. The returned string may be overwritten by the next call to g-getenv, g-setenv or g_unsetenv().

Details

Returns the value of an environment variable.

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.

Example

(g-getenv "HOME") => "/home/dieter"    
 

See also

2020-10-24