Answers for "using of find if function in c++ on string"

C++
4

check if character in string c++

std::string s = "hell[o";
if (s.find('[') != std::string::npos)
    ; // found
else
    ; //
Posted by: Guest on September-14-2020
10

c++ string contains

if (string1.find(string2) != std::string::npos) {
    std::cout << "found!" << '\n';
}
Posted by: Guest on April-02-2020

Code answers related to "using of find if function in c++ on string"

Browse Popular Code Answers by Language