|
static std::wstring | ToWideStr (const std::string &str, bool utf8=false) |
| 将窄字符串转为宽字符串
|
|
static std::string | ToMultiByteStr (const std::wstring &wstr, bool utf8=false) |
| 将宽字符串转为窄字符串
|
|
static std::wstring | Trim (const std::wstring &str) |
| 删除首尾空白字符
|
|
static std::wstring | TrimStart (const std::wstring &str) |
| 删除串首空白字符
|
|
static std::wstring | TrimEnd (const std::wstring &str) |
| 删除串尾空白字符
|
|
static std::vector< std::wstring > | Split (const std::wstring &str, const std::wstring &delimiter) |
| 对字符串按照指定分隔符进行拆分
|
|
static std::wstring | FormatStr (const wchar_t *fmt,...) |
| 格式化字符串,类似于 swprintf ,但返回一个动态分配的 std::wstring
|
|
template<typename T > |
static constexpr T | Max (const T &a, const T &b) |
| 取两值中的较大值
|
|
template<typename T > |
static constexpr T | Min (const T &a, const T &b) |
| 取两值中的较小值
|
|
template<typename... Args> |
static std::wstring | BuildStr (const Args &...args) |
| 拼接字符串,也可使用此函数将其他类型转为wstring
|
|