#include "config.h" #include "strutils.h" #include namespace al { al::optional getenv(const char *envname) { const char *str{std::getenv(envname)}; if(str && str[0] != '\0') return str; return al::nullopt; } #ifdef _WIN32 al::optional getenv(const WCHAR *envname) { const WCHAR *str{_wgetenv(envname)}; if(str && str[0] != L'\0') return str; return al::nullopt; } #endif } // namespace al