2021-04-28 12:43:51 +08:00
|
|
|
#ifndef AL_STRUTILS_H
|
|
|
|
#define AL_STRUTILS_H
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
2023-05-31 23:57:33 +08:00
|
|
|
#include "aloptional.h"
|
|
|
|
|
2021-04-28 12:43:51 +08:00
|
|
|
#ifdef _WIN32
|
|
|
|
#include <wchar.h>
|
|
|
|
|
|
|
|
std::string wstr_to_utf8(const wchar_t *wstr);
|
|
|
|
std::wstring utf8_to_wstr(const char *str);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
namespace al {
|
|
|
|
|
2023-05-31 23:57:33 +08:00
|
|
|
al::optional<std::string> getenv(const char *envname);
|
2021-04-28 12:43:51 +08:00
|
|
|
#ifdef _WIN32
|
2023-05-31 23:57:33 +08:00
|
|
|
al::optional<std::wstring> getenv(const wchar_t *envname);
|
2021-04-28 12:43:51 +08:00
|
|
|
#endif
|
|
|
|
|
|
|
|
} // namespace al
|
|
|
|
|
|
|
|
#endif /* AL_STRUTILS_H */
|