66 static std::wstring
Trim(
const std::wstring &
str);
88 static std::vector<std::wstring>
Split(
const std::wstring &
str,
const std::wstring &
delimiter);
102 template <
typename T>
103 static constexpr inline T
Max(
const T &
a,
const T &b)
105 return a > b ?
a : b;
111 template <
typename T>
112 static constexpr inline T
Min(
const T &
a,
const T &b)
114 return a < b ?
a : b;
120 template <
typename...
Args>
123 std::wstringstream
wss;
124 int _[]{(_BuildStr(
wss,
args), 0)...};
132 template <
typename T>
133 static auto _BuildStr(std::wostream &
wos,
const T &
arg)
142 template <
typename T>
143 static auto _BuildStr(std::wostream &wos,
const T &arg)
144 ->
typename std::enable_if<!_IsProperty<T>::value && _HasToString<T>::value>::type
146 Utils::_BuildStr(wos, arg.ToString());
152 template <
typename T>
153 static auto _BuildStr(std::wostream &wos,
const T &prop)
154 ->
typename std::enable_if<_IsProperty<T>::value>::type
156 Utils::_BuildStr(wos, prop.Get());
162 static void _BuildStr(std::wostream &wos,
bool b)
164 wos << (b ? L
"true" : L
"false");
170 static void _BuildStr(std::wostream &wos,
const char *str)
178 static void _BuildStr(std::wostream &wos,
const std::string &str)
186 template <
typename T>
187 static void _BuildStr(std::wostream &wos,
const std::vector<T> &vec)
189 auto beg = vec.begin();
190 auto end = vec.end();
192 for (
auto it = beg; it != end; ++it) {
203 template <
typename TKey,
typename TVal>
204 static void _BuildStr(std::wostream &wos,
const std::map<TKey, TVal> &map)
206 auto beg = map.begin();
207 auto end = map.end();
209 for (
auto it = beg; it != end; ++it) {
212 _BuildStr(wos, it->first);
214 _BuildStr(wos, it->second);
222 template <
typename TKey,
typename TVal>
223 static void _BuildStr(std::wostream &wos,
const std::unordered_map<TKey, TVal> &map)
225 auto beg = map.begin();
226 auto end = map.end();
228 for (
auto it = beg; it != end; ++it) {
231 _BuildStr(wos, it->first);
233 _BuildStr(wos, it->second);