Mega Code Archive

 
Categories / C++ Tutorial / String
 

Find the first of any of these chars

#include <string> #include <iostream> int main( ) {    std::string s = "Search from the beginning";    std::cout << s.find_first_of("swi")           // Find the first of any of these chars              << '\n';                             } 19