strutils.h 447 B

123456789101112131415161718192021222324
  1. #ifndef AL_STRUTILS_H
  2. #define AL_STRUTILS_H
  3. #include <optional>
  4. #include <string>
  5. #ifdef _WIN32
  6. #include <cwchar>
  7. #include <string_view>
  8. std::string wstr_to_utf8(std::wstring_view wstr);
  9. std::wstring utf8_to_wstr(std::string_view str);
  10. #endif
  11. namespace al {
  12. std::optional<std::string> getenv(const char *envname);
  13. #ifdef _WIN32
  14. std::optional<std::wstring> getenv(const wchar_t *envname);
  15. #endif
  16. } // namespace al
  17. #endif /* AL_STRUTILS_H */