| 24 | } |
| 25 | |
| 26 | unique_ptr<WCHAR[]> stringToUtf16(String const& s) { |
| 27 | int utf16Len = MultiByteToWideChar(CP_UTF8, 0, s.utf8Ptr(), s.utf8Size() + 1, NULL, 0); |
| 28 | unique_ptr<WCHAR[]> result; |
| 29 | result.reset(new WCHAR[utf16Len]); |
| 30 | MultiByteToWideChar(CP_UTF8, 0, s.utf8Ptr(), s.utf8Size() + 1, result.get(), utf16Len); |
| 31 | return result; |
| 32 | } |
| 33 | |
| 34 | } |
no test coverage detected