
// Online C++ Compiler - Build, Compile and Run your C++ programs online in your favorite browser

#include<iostream>

using namespace std;

int main()
{   
    string s = "+More";
    
    cout<<"s: " << s << "\n";
    cout<<"s.length(): " << s.length() << "\n";
    cout<<"s.find('+'): " << s.find('+') << "\n";
    
    if(s.find('+')<s.length())
    { //to find +
        cout<<"+ substring found\n";
    } else {
        cout<<"+ substring not found\n";
    }
    
    string t = "More++";
    
    cout<<"\nt: " << t << "\n";
    cout<<"t.length(): " << t.length() << "\n";
    cout<<"t.find('+'): " << t.find('+') << "\n";
    
    if(t.find("++")<t.length())
    { //to find ++
        cout<<"++ substring found\n";
    } else {
        cout<<"++ substring not found\n";
    }
    return 0;
}
