MCPcopy Create free account
hub / github.com/PyMesh/PyMesh / StreamWideCharsToMessage

Function StreamWideCharsToMessage

tests/external/gmock-1.7.0/gtest/src/gtest.cc:888–900  ·  view source on GitHub ↗

Converts an array of wide chars to a narrow string using the UTF-8 encoding, and streams the result to the given Message object.

Source from the content-addressed store, hash-verified

886// Converts an array of wide chars to a narrow string using the UTF-8
887// encoding, and streams the result to the given Message object.
888static void StreamWideCharsToMessage(const wchar_t* wstr, size_t length,
889 Message* msg) {
890 for (size_t i = 0; i != length; ) { // NOLINT
891 if (wstr[i] != L'\0') {
892 *msg << WideStringToUtf8(wstr + i, static_cast<int>(length - i));
893 while (i != length && wstr[i] != L'\0')
894 i++;
895 } else {
896 *msg << '\0';
897 i++;
898 }
899 }
900}
901
902#endif // GTEST_HAS_STD_WSTRING || GTEST_HAS_GLOBAL_WSTRING
903

Callers 1

gtest.ccFile · 0.70

Calls 1

WideStringToUtf8Function · 0.70

Tested by

no test coverage detected