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