MCPcopy Create free account
hub / github.com/apache/arrow / WideStringToUTF8Internal

Function WideStringToUTF8Internal

cpp/src/arrow/util/utf8.cc:139–147  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

137}
138
139std::string WideStringToUTF8Internal(const std::wstring& source) {
140 std::string s;
141#if WCHAR_MAX > 0xFFFF
142 ::utf8::utf32to8(source.begin(), source.end(), std::back_inserter(s));
143#else
144 ::utf8::utf16to8(source.begin(), source.end(), std::back_inserter(s));
145#endif
146 return s;
147}
148
149std::string UTF16StringToUTF8Internal(std::u16string_view source) {
150 std::string s;

Callers 1

Calls 2

beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected