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

Function getIndexOfLastNotChar16

core/base/UTF8.cpp:126–136  ·  view source on GitHub ↗

endif * @str: the string to search through. * @c: the character to not look for. * * Return value: the index of the last character that is not c. * */

Source from the content-addressed store, hash-verified

124 * Return value: the index of the last character that is not c.
125 * */
126unsigned int getIndexOfLastNotChar16(const std::vector<char16_t>& str, char16_t c)
127{
128 int len = static_cast<int>(str.size());
129
130 int i = len - 1;
131 for (; i >= 0; --i)
132 if (str[i] != c)
133 return i;
134
135 return i;
136}
137
138/*
139 * @str: the string to trim

Callers 1

UTF8Tests.cppFile · 0.85

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected