Created
January 1, 2017 20:19
-
-
Save ilpropheta/07d9f9efa9f3d518031ab5520802ab2d to your computer and use it in GitHub Desktop.
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
string_view parse_int(string_view sv, int& i) | |
{ | |
char* endPtr = nullptr; | |
i = strtol(sv.data(), &endPtr, 10); | |
return sv.substr(endPtr-sv.begin()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment