aboutsummaryrefslogtreecommitdiffstats
path: root/common/strutils.h
blob: 67f057a7bb36f9146c1cafd7e23d521e5e8e0845 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#ifndef AL_STRUTILS_H
#define AL_STRUTILS_H

#include <optional>
#include <string>

#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 {

std::optional<std::string> getenv(const char *envname);
#ifdef _WIN32
std::optional<std::wstring> getenv(const wchar_t *envname);
#endif

} // namespace al

#endif /* AL_STRUTILS_H */