Table of Contents Previous topic Next topic
C++ COMPILER LIBRARY FUNCTIONS->String Class Functions->Member Functions->rfind
#include <string>
size_t rfind (const string& str, size_t pos = npos) const
Starting from pos searching backwards, return the position of the first occurrence of the characters of str, or npos if no match is found.
size_t rfind (const char* s, size_t pos, size_t n) const
Starting from pos searching backwards, return the position of the first occurrence of the characters of array of length n whose first element is s, or npos if no match is found.
size_t rfind (const char* s, size_t pos = npos) const
Starting from pos searching backwards, return the position of the first occurrence of the characters of array of length strlen(s) whose first element is s, or npos if no match is found.
size_t rfind (char c, size_t pos = npos) const
Starting from pos searching backwards, return the position of the first occurrence of the character c, or npos if no match is found.