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

Method find_first_of

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

Source from the content-addressed store, hash-verified

593// ======= FIND_FIRST_OF =======
594
595fl::size basic_string::find_first_of(const char* s, fl::size pos, fl::size count) const {
596 if (!s || count == 0) return npos;
597 if (pos >= mLength) return npos;
598 const char* str = c_str();
599 for (fl::size i = pos; i < mLength; ++i) {
600 for (fl::size j = 0; j < count; ++j) {
601 if (str[i] == s[j]) return i;
602 }
603 }
604 return npos;
605}
606
607fl::size basic_string::find_first_of(const char* s, fl::size pos) const {
608 if (!s) return npos;

Callers 2

FL_TEST_FILEFunction · 0.45
FL_TEST_FILEFunction · 0.45

Calls 4

strlenFunction · 0.85
findFunction · 0.70
c_strMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected