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
}
}
Code Example |
---|
Cpp :: Exit Button c++ code |
Cpp :: fill two dimensional array c++ |
Cpp :: c++ namespace example |
Cpp :: prevent copy c++ |
Cpp :: create new node in tree |
Cpp :: max pooling in c++ |
Cpp :: resharper fold if statement c+ |
Cpp :: vector<intv[] |
Cpp :: c++ little endian or big endian |
Cpp :: c++ thread wait fro 1 sec |
Cpp :: glfw error: the glfw library is not initialized |
Cpp :: Operators in C / C++ |
Cpp :: intersection between vector c++ |
Cpp :: ascii allowed in c++ |
Cpp :: std::future |
Cpp :: assign one vector to another c++ |
Cpp :: clear map in C++ |
Cpp :: copy assignment operator in c++ |
Cpp :: hello world programming |
Cpp :: priority queue in cpp |
Cpp :: phi function |
Cpp :: flutter text direction auto |
Cpp :: queue in cpp |
Cpp :: ue4 c++ switch enum |
Cpp :: codeforces problem 1030A solution |
Cpp :: vector insert to end |
Cpp :: solve problem of getline |
Cpp :: fabs c c++ |
Cpp :: const in c++ is same as globle in python |
Cpp :: How To Calculate 1+1 in c++ |