Sha256: 8791b61fe1402d238d054ef571fe2d7fcb7f0d772efe8f00548eff4fe4cb0d03
Contents?: true
Size: 693 Bytes
Versions: 16
Compression:
Stored size: 693 Bytes
Contents
#include <leatherman/util/environment.hpp> #include <boost/nowide/cenv.hpp> using namespace std; namespace leatherman { namespace util { bool environment::get(string const& name, string& value) { auto variable = boost::nowide::getenv(name.c_str()); if (!variable) { return false; } value = variable; return true; } bool environment::set(string const& name, string const& value) { return boost::nowide::setenv(name.c_str(), value.c_str(), 1) == 0; } bool environment::clear(string const& name) { return boost::nowide::unsetenv(name.c_str()) == 0; } }} // namespace leatherman::util
Version data entries
16 entries across 16 versions & 2 rubygems