Modules

Environment

moduleSource
macOSLinuxWindows

#import "Extensions/Environment";

Reading the variables the program was started with.

The values are text in the environment as the system hands it over; this module only reads. Setting variables is not part of it.

Example
assert(has_environment_variable("PATH"));
assert(!has_environment_variable("JAI_DOC_SURELY_UNSET_VARIABLE"));

Doesn't run in the browser (skipped on wasm).