diff options
Diffstat (limited to 'common/strutils.h')
-rw-r--r-- | common/strutils.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/common/strutils.h b/common/strutils.h new file mode 100644 index 00000000..0c7a0e22 --- /dev/null +++ b/common/strutils.h @@ -0,0 +1,24 @@ +#ifndef AL_STRUTILS_H +#define AL_STRUTILS_H + +#include <string> + +#include "aloptional.h" + +#ifdef _WIN32 +#include <wchar.h> + +std::string wstr_to_utf8(const wchar_t *wstr); +std::wstring utf8_to_wstr(const char *str); +#endif + +namespace al { + +al::optional<std::string> getenv(const char *envname); +#ifdef _WIN32 +al::optional<std::wstring> getenv(const wchar_t *envname); +#endif + +} // namespace al + +#endif /* AL_STRUTILS_H */ |