c++ string contains

C++
if (string1.find(string2) != std::string::npos) {
    std::cout << "found!" << '\n';
}size_t find (const string& str, size_t pos = 0) const;

Source

Also in C++: