Mega Code Archive
Categories
/
C++ Tutorial
/
String
Search from the end
#include
#include
int main( ) { std::string s = "Search from the beginning"; std::cout << s.rfind("ar") << '\n'; // Search from the end } 2