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

Method find_first_of

src/fl/stl/string_view.h:270–280  ·  view source on GitHub ↗

Find first of any character in set

Source from the content-addressed store, hash-verified

268
269 // Find first of any character in set
270 fl::size find_first_of(string_view sv, fl::size pos = 0) const FL_NOEXCEPT {
271 if (pos >= mSize || sv.empty()) return npos;
272 for (fl::size i = pos; i < mSize; ++i) {
273 for (fl::size j = 0; j < sv.mSize; ++j) {
274 if (mData[i] == sv.mData[j]) {
275 return i;
276 }
277 }
278 }
279 return npos;
280 }
281
282 fl::size find_first_of(char ch, fl::size pos = 0) const FL_NOEXCEPT {
283 return find(ch, pos);

Callers

nothing calls this directly

Calls 3

findFunction · 0.70
string_viewClass · 0.70
emptyMethod · 0.45

Tested by

no test coverage detected