MCPcopy Create free account
hub / github.com/FastLED/FastLED / find_last_of

Method find_last_of

src/fl/stl/basic_string.cpp.hpp:617–628  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

615// ======= FIND_LAST_OF =======
616
617fl::size basic_string::find_last_of(const char* s, fl::size pos, fl::size count) const {
618 if (!s || count == 0) return npos;
619 if (mLength == 0) return npos;
620 fl::size searchPos = (pos >= mLength || pos == npos) ? (mLength - 1) : pos;
621 const char* str = c_str();
622 for (fl::size i = searchPos + 1; i > 0; --i) {
623 for (fl::size j = 0; j < count; ++j) {
624 if (str[i - 1] == s[j]) return i - 1;
625 }
626 }
627 return npos;
628}
629
630fl::size basic_string::find_last_of(const char* s, fl::size pos) const {
631 if (!s) return npos;

Callers 8

mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45
FL_TEST_FILEFunction · 0.45
FL_TEST_FILEFunction · 0.45

Calls 3

strlenFunction · 0.85
c_strMethod · 0.45
sizeMethod · 0.45

Tested by 3

mainFunction · 0.36
mainFunction · 0.36
mainFunction · 0.36