Separate declaring a lambda from calling it
[openal-soft.git] / common / strutils.h
blob3644847c2bcaae3d379d582f40a6568bed021347
1 #ifndef AL_STRUTILS_H
2 #define AL_STRUTILS_H
4 #include <optional>
5 #include <string>
7 #ifdef _WIN32
8 #include <cwchar>
9 #include <string_view>
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 */