| 111 | } |
| 112 | |
| 113 | std::string WideCharToMultiByte(const wchar_t* str, int len) |
| 114 | { |
| 115 | int buf_size = len*2 + 2; |
| 116 | std::vector<char> buf(buf_size); |
| 117 | int write_len = ::WideCharToMultiByte(0, 0, str, len, buf.data(), buf.size(), nullptr, nullptr); |
| 118 | return std::string(buf.data(), buf.data() + write_len); |
| 119 | } |
| 120 | |
| 121 | std::string WideCharToMultiByte(const wchar_t* str) |
| 122 | { |
no test coverage detected