check if a string is a prefix of another c 2b 2b

Solutions on MaxInterview for check if a string is a prefix of another c 2b 2b by the best coders in the world

showing results for - "check if a string is a prefix of another c 2b 2b"
Pedro
02 Mar 2020
1std::string prefix = "foo";
2std::string string = "foobar";
3
4bool isPrefix = std::mismatch(prefix.begin(), prefix.end(),
5    string.begin(), string.end()).first == prefix.end();
6