MCPcopy Create free account
hub / github.com/QuEST-Kit/QuEST / getEnvVarValue

Function getEnvVarValue

tests/utils/config.cpp:20–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18 */
19
20string getEnvVarValue(string name) {
21
22 // unspecified var returns empty string
23 const char* ptr = std::getenv(name.c_str());
24 return (ptr == nullptr)? "" : std::string(ptr);
25}
26
27int getIntEnvVarValueOrDefault(string name, int defaultValue) {
28

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected