Is there any way in C++ to check whether a string starts with a certain string (smaller than the original) ? Just like we can do in Java
bigString.startswith(smallString);
std::string s("Hello world"); if (s.find("Hello") == 0) { std::cout << "String starts with Hello "; }
2.1m questions
2.1m answers
60 comments
57.0k users