std::string / Finding characters in a string / Ess

Run Settings
LanguageC++
Language Version
Run Command
#include <iostream> #include <string> using namespace std; int main() { std::string str = "Curiosity killed the cat"; auto it = str.find("cat"); if (it != std::string::npos) std::cout << "Found at position: " << it << '\n'; else std::cout << "Not found!\n"; }
Editor Settings
Theme
Key bindings
Full width
Lines