MCPcopy Create free account
hub / github.com/axmolengine/axmol / trimUTF32VectorFromIndex

Function trimUTF32VectorFromIndex

core/base/UTF8.cpp:163–170  ·  view source on GitHub ↗

* @str: the string to trim * @index: the index to start trimming from. * * Trims str st str=[0, index) after the operation. * * Return value: the trimmed string. * */

Source from the content-addressed store, hash-verified

161 * Return value: the trimmed string.
162 * */
163static void trimUTF32VectorFromIndex(std::vector<char32_t>& str, int index)
164{
165 int size = static_cast<int>(str.size());
166 if (index >= size || index < 0)
167 return;
168
169 str.erase(str.begin() + index, str.begin() + size);
170}
171
172/*
173 * @ch is the unicode character whitespace?

Callers 1

trimUTF32VectorFunction · 0.85

Calls 3

sizeMethod · 0.45
eraseMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected