Back to Richel Bilderbeek's homepage.
Back to Richel Bilderbeek's Code Snippets.
Find a std::string in a std::string.
Code in plain text can be found here.
#include <cassert>
#include <string>
int main ()
{
const std::string searchme = "BILDERBIKKEL WAS HERE";
assert(searchme.find("BILDERBIKKEL") != std::string::npos);
assert(searchme.find("RICHEL") == std::string::npos);
}
Back to Richel Bilderbeek's Code Snippets.
Back to Richel Bilderbeek's homepage.