Simple struct providing one static method that reads an environment variable into an ALib string-type.
While under posix compatible operating systems, environment variable names are case-sensitive, under Microsoft windows they are not.
Definition at line 26 of file environment.hpp.
#include <environment.hpp>
Public Static Method Index: | |
static ALIB_API bool | Get (const CString &varName, AString &target, lang::CurrentData targetData=lang::CurrentData::Clear) |
|
static |
Reads an environment variable into an ALib string.
std::filesystem::path::value_type
, while the one of AString depends on compilation symbol ALIB_CHARACTERS_WIDE. On GNU/Linux and MacOS, both default to nchar, on WindowsOS both default to wchar and as such compatibility is given with the defaults. If compilation of ALib is explicitly switched to use a different character type, then conversion has to be performed.varName | The name of the variable to be retrieved. |
target | An AString to write the result to. |
targetData | If CurrentData::Keep , the parameter target is not cleared before the result is written. Defaults to CurrentData::Clear . |
true
if variable was found. Definition at line 24 of file environment.cpp.