Converts an array of wide chars to a narrow string using the UTF-8 encoding, and streams the result to the given Message object.
| 2393 | // Converts an array of wide chars to a narrow string using the UTF-8 |
| 2394 | // encoding, and streams the result to the given Message object. |
| 2395 | static void StreamWideCharsToMessage(const wchar_t* wstr, size_t length, |
| 2396 | Message* msg) { |
| 2397 | for (size_t i = 0; i != length; ) { // NOLINT |
| 2398 | if (wstr[i] != L'\0') { |
| 2399 | *msg << WideStringToUtf8(wstr + i, static_cast<int>(length - i)); |
| 2400 | while (i != length && wstr[i] != L'\0') |
| 2401 | i++; |
| 2402 | } else { |
| 2403 | *msg << '\0'; |
| 2404 | i++; |
| 2405 | } |
| 2406 | } |
| 2407 | } |
| 2408 | |
| 2409 | #endif // GTEST_HAS_STD_WSTRING || GTEST_HAS_GLOBAL_WSTRING |
| 2410 |
no test coverage detected