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

◆ rfind() [1/4]

fl::size fl::basic_string::rfind ( char c,
fl::size pos = npos ) const

Definition at line 554 of file basic_string.cpp.hpp.

554 {
555 if (mLength == 0) return npos;
556 fl::size searchPos = (pos >= mLength || pos == npos) ? (mLength - 1) : pos;
557 const char* str = c_str();
558 for (fl::size i = searchPos + 1; i > 0; --i) {
559 if (str[i - 1] == c) return i - 1;
560 }
561 return npos;
562}
uint8_t pos
Definition Blur.ino:11
static constexpr fl::size npos
const char * c_str() const FL_NOEXCEPT

References c_str(), mLength, npos, and pos.

Referenced by find_last_of(), rfind(), and rfind().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: