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

Method countUTF8CodePoints

src/utils/stringutil.cc:455–464  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

453}
454
455size_t StringUtil::countUTF8CodePoints(const std::string& str) {
456 size_t count = 0;
457 const char* cur = str.data();
458 const char* end = cur + str.length();
459 while (UTF8::nextCodepoint(&cur, end) != 0) {
460 ++count;
461 }
462
463 return count;
464}
465
466
467String StringUtil::stripShell(const std::string& str) {

Callers

nothing calls this directly

Calls 1

dataMethod · 0.45

Tested by

no test coverage detected