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

Function trimUTF16VectorFromIndex

core/base/UTF8.cpp:146–153  ·  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

144 * Return value: the trimmed string.
145 * */
146static void trimUTF16VectorFromIndex(std::vector<char16_t>& str, int index)
147{
148 int size = static_cast<int>(str.size());
149 if (index >= size || index < 0)
150 return;
151
152 str.erase(str.begin() + index, str.begin() + size);
153}
154
155/*
156 * @str: the string to trim

Callers 1

trimUTF16VectorFunction · 0.85

Calls 3

sizeMethod · 0.45
eraseMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected