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 "; }
1.4m articles
1.4m replys
5 comments
57.0k users