| 2 | #include <SDR Shared\BareWindows.hpp> |
| 3 | |
| 4 | std::string SDR::String::ToUTF8(const std::wstring& input) |
| 5 | { |
| 6 | std::string ret; |
| 7 | |
| 8 | auto size = WideCharToMultiByte(CP_UTF8, 0, input.data(), input.size(), nullptr, 0, nullptr, nullptr); |
| 9 | ret.resize(size, 0); |
| 10 | |
| 11 | WideCharToMultiByte(CP_UTF8, 0, input.data(), input.size(), &ret.front(), size, nullptr, nullptr); |
| 12 | |
| 13 | return ret; |
| 14 | } |
| 15 | |
| 16 | std::string SDR::String::ToUTF8(const wchar_t* input) |
| 17 | { |
nothing calls this directly
no outgoing calls
no test coverage detected