I have two strings which I\'d like to compare: String and String:. Is there a library function that would return true when passed these two strings
String
String:
bool IsPrefix(const std::string& prefix, const std::string& whole) { return whole.size() >= prefix.size() && whole.compare(0, prefix.size(), prefix) == 0; }