COMMON: Fix return value of String::findLastNotOf

This commit is contained in:
Matthew Duggan 2020-02-25 23:26:00 +09:00 committed by Paul Gilbert
parent 68ab4f4e88
commit ff840ba47b

View File

@ -767,7 +767,7 @@ size_t String::findFirstNotOf(const char *chars, size_t pos) const {
size_t String::findLastNotOf(char c) const {
for (int idx = (int)_size - 1; idx >= 0; --idx) {
if ((*this)[idx] != c)
return c;
return idx;
}
return npos;