2021-01-26 13:01:35 -06:00
|
|
|
#ifndef AL_STRUTILS_H
|
|
|
|
|
#define AL_STRUTILS_H
|
|
|
|
|
|
2024-06-30 14:35:57 -05:00
|
|
|
#include <optional>
|
2021-01-26 13:01:35 -06:00
|
|
|
#include <string>
|
|
|
|
|
|
|
|
|
|
#ifdef _WIN32
|
2024-06-30 14:35:57 -05:00
|
|
|
#include <cwchar>
|
|
|
|
|
#include <string_view>
|
2021-01-26 13:01:35 -06:00
|
|
|
|
2024-06-30 14:35:57 -05:00
|
|
|
std::string wstr_to_utf8(std::wstring_view wstr);
|
|
|
|
|
std::wstring utf8_to_wstr(std::string_view str);
|
2021-01-26 13:01:35 -06:00
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
namespace al {
|
|
|
|
|
|
2024-06-30 14:35:57 -05:00
|
|
|
std::optional<std::string> getenv(const char *envname);
|
2021-01-26 13:01:35 -06:00
|
|
|
#ifdef _WIN32
|
2024-06-30 14:35:57 -05:00
|
|
|
std::optional<std::wstring> getenv(const wchar_t *envname);
|
2021-01-26 13:01:35 -06:00
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
} // namespace al
|
|
|
|
|
|
|
|
|
|
#endif /* AL_STRUTILS_H */
|