Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

find text in string c++ true false

int main ()
{
    int found = text.find("some text");
    if (found != std::string::npos)
    {
        //do stuff if word is there
    }
    else
    {
        //do stuff when word isnt there
    }
}
 
PREVIOUS NEXT
Tagged: #find #text #string #true #false
ADD COMMENT
Topic
Name
7+5 =