Last active
February 1, 2019 08:28
-
-
Save liuml07/5672247 to your computer and use it in GitHub Desktop.
The missing std::string::starts_with(string)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
inline bool starts_with(const string &big_str, const string &small_str) { | |
return big_str.compare(0, small_str.length(), small_str) == 0; | |
} |
Liam0205
commented
Dec 14, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment