Created
January 1, 2017 20:17
-
-
Save ilpropheta/669c155aa24b6eedf6bb31ee0602f22e 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 url("website/number1/1/number2/2"); // certainly null-terminated | |
string_view tokens = split(url, "/"); | |
auto number1AsInt = strtol(tokens[2].data(), nullptr, 10); // 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment