Last active
August 29, 2015 14:18
-
-
Save winni2k/1ab7f30a1372260ba56f to your computer and use it in GitHub Desktop.
Find end of first five cols
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::size_type p_last = str.find_first_not_of(" ", 0); | |
string::size_type p_curr = str.find_first_of(" ", p_last); | |
// seek to end of header columns (5) | |
for(int i = 0; i<4; ++i){ | |
p_last = str.find_first_not_of(" ", p_curr); | |
p_curr = str.find_first_of(" ", p_last); | |
} | |
ss.str(line.substr(0, p_last + 1)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment