Reads current process environment variables. More...
#include <Process.h>
Public Member Functions | |
| ProcessEnvironment (const ProcessEnvironment &)=delete | |
| ProcessEnvironment (ProcessEnvironment &&)=delete | |
| ProcessEnvironment & | operator= (const ProcessEnvironment &)=delete |
| ProcessEnvironment & | operator= (ProcessEnvironment &&)=delete |
| size_t | size () const |
| Returns the total number of environment variables for current process. | |
| bool | get (size_t index, StringSpan &name, StringSpan &value) const |
| Get the environment variable at given index, returning its name and value. | |
| bool | contains (StringSpan variableName, size_t *index=nullptr) |
| Checks if an environment variable exists in current process. | |
Reads current process environment variables.
Example: Print all environment variables to stdout
|
nodiscard |
Checks if an environment variable exists in current process.
| variableName | Name of the variable to check |
| index | Optional pointer to a variable that will receive the index of the variable (only if found) |
|
nodiscard |
Get the environment variable at given index, returning its name and value.
| index | The index of the variable to retrieve (must be less than ProcessEnvironment::size()) |
| name | The parsed name of the environment variable at requested index |
| value | The parsed value of the environment variable at requested index |
|
inlinenodiscard |
Returns the total number of environment variables for current process.