FastLED 3.9.15
Loading...
Searching...
No Matches

◆ find() [4/6]

template<fl::size SIZE = FASTLED_STR_INLINED_SIZE>
fl::size fl::StrN< SIZE >::find ( const char * substr,
fl::size start_pos ) const
inline

Definition at line 450 of file str.h.

450 {
451 if (!substr || start_pos >= mLength) {
452 return npos;
453 }
454 auto begin = c_str() + start_pos;
455 const char* found = strstr(begin, substr);
456 if (found) {
457 return found - c_str();
458 }
459 return npos;
460 }
static constexpr fl::size npos
Definition str.h:146
StrN substr(fl::size start, fl::size length) const
Definition str.h:543
char * begin()
Definition str.h:353
const char * c_str() const
Definition str.h:326
fl::size mLength
Definition str.h:140

References begin(), c_str(), mLength, npos, and substr().

+ Here is the call graph for this function: