Fixed compilation as a subdirectory with MinGW (#991)
[openal-soft.git] / common / strutils.h
blob7eee0c1d12694728e914eaa9daae5c11ae7c548c
1 #ifndef AL_STRUTILS_H
2 #define AL_STRUTILS_H
4 #include <optional>
5 #include <string>
7 #ifdef _WIN32
8 #include <string_view>
9 #include <wchar.h>
11 std::string wstr_to_utf8(std::wstring_view wstr);
12 std::wstring utf8_to_wstr(std::string_view str);
13 #endif
15 namespace al {
17 std::optional<std::string> getenv(const char *envname);
18 #ifdef _WIN32
19 std::optional<std::wstring> getenv(const wchar_t *envname);
20 #endif
22 } // namespace al
24 #endif /* AL_STRUTILS_H */