* Convert a UTF-8 wstring to an ASCII string */
| 173 | * Convert a UTF-8 wstring to an ASCII string |
| 174 | */ |
| 175 | inline std::string wstring_2_string(const std::wstring& ws) |
| 176 | { |
| 177 | std::wstring_convert<std::codecvt_utf8<wchar_t>> cvt; |
| 178 | std::string s = cvt.to_bytes(ws); |
| 179 | return s; |
| 180 | } |
| 181 | |
| 182 | /** |
| 183 | * Convert a UTF-32 codepoint to a UTF-8 string |
no outgoing calls
no test coverage detected