environment

Manipulates environment variables using an associative-array-like interface.

This class contains only static methods, and cannot be instantiated. See below for examples of use.

Members

Static functions

get
string get(const(char)[] name, string defaultValue)

Retrieves the value of the environment variable with the given name, or a default value if the variable doesn't exist.

opBinaryRight
bool opBinaryRight(const(char)[] name)

Identify whether a variable is defined in the environment.

opIndex
string opIndex(const(char)[] name)

Retrieves the value of the environment variable with the given name.

opIndexAssign
inout(char)[] opIndexAssign(char[] value, const(char)[] name)

Assigns the given value to the environment variable with the given name. If value is null the variable is removed from environment.

remove
void remove(const(char)[] name)

Removes the environment variable with the given name.

toAA
string[string] toAA()

Copies all environment variables into an associative array.

Meta