MCPcopy Create free account
hub / github.com/asmuth/clip / convertUTF16To8

Method convertUTF16To8

src/utils/stringutil.cc:444–453  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

442}
443
444std::basic_string<char> StringUtil::convertUTF16To8(
445 const std::basic_string<char16_t>& str) {
446 String out;
447
448 for (const auto& c : str) {
449 UTF8::encodeCodepoint(c, &out);
450 }
451
452 return out;
453}
454
455size_t StringUtil::countUTF8CodePoints(const std::string& str) {
456 size_t count = 0;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected