diff options
author | Sven Gothel <[email protected]> | 2023-11-28 12:51:46 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2023-11-28 12:51:46 +0100 |
commit | 1aaf4f070011490bcece50394b9b32dfa593fd9e (patch) | |
tree | 17d68284e401a35eea3d3a574d986d446a60763a /common/strutils.h | |
parent | 6e7cee4fa9a8af03f28ca26cd89f8357390dfc90 (diff) | |
parent | 571b546f35eead77ce109f8d4dd6c3de3199d573 (diff) |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'common/strutils.h')
-rw-r--r-- | common/strutils.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/common/strutils.h b/common/strutils.h index 0c7a0e22..7eee0c1d 100644 --- a/common/strutils.h +++ b/common/strutils.h @@ -1,22 +1,22 @@ #ifndef AL_STRUTILS_H #define AL_STRUTILS_H +#include <optional> #include <string> -#include "aloptional.h" - #ifdef _WIN32 +#include <string_view> #include <wchar.h> -std::string wstr_to_utf8(const wchar_t *wstr); -std::wstring utf8_to_wstr(const char *str); +std::string wstr_to_utf8(std::wstring_view wstr); +std::wstring utf8_to_wstr(std::string_view str); #endif namespace al { -al::optional<std::string> getenv(const char *envname); +std::optional<std::string> getenv(const char *envname); #ifdef _WIN32 -al::optional<std::wstring> getenv(const wchar_t *envname); +std::optional<std::wstring> getenv(const wchar_t *envname); #endif } // namespace al |