[Home]
[Edit this page]
[Recent Changes]
[Special Pages]
[Help]
CppFindString
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
CppFindString
(C++) Finding a std::string in a std::string
int main () { const std::string searchme = "BILDERBIKKEL WAS HERE"; assert(searchme.find("BILDERBIKKEL") != std::string::npos); assert(searchme.find("RICHEL") == std::string::npos); }
- include <cassert>
- include <string>
Other code snippets
Code links
- #include
- assert
- cassert (header file)
- const
- include
- int
- main
- std::string
- string
- string (header file)
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
