| 615 | // ======= FIND_LAST_OF ======= |
| 616 | |
| 617 | fl::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 | |
| 630 | fl::size basic_string::find_last_of(const char* s, fl::size pos) const { |
| 631 | if (!s) return npos; |