MCPcopy Create free account
hub / github.com/crosspoint-reader/crosspoint-reader / utf8TruncateChars

Function utf8TruncateChars

lib/Utf8/Utf8.cpp:176–180  ·  view source on GitHub ↗

Truncate string by removing N UTF-8 characters from the end

Source from the content-addressed store, hash-verified

174
175// Truncate string by removing N UTF-8 characters from the end
176void utf8TruncateChars(std::string& str, const size_t numChars) {
177 for (size_t i = 0; i < numChars && !str.empty(); ++i) {
178 utf8RemoveLastChar(str);
179 }
180}

Callers

nothing calls this directly

Calls 2

utf8RemoveLastCharFunction · 0.85
emptyMethod · 0.45

Tested by

no test coverage detected