find() c++ string code example
Example 1: string .find in c++
std::string t = "Banana Republic";
std::string s = "nana";
std::string::size_type i = t.find(s);
if (i != std::string::npos)
t.erase(i, s.length());
Example 2: find in string c++
size_t find (const string& str, size_t pos = 0) const;