Created
July 31, 2017 17:47
-
-
Save dennisbot/c7a7998aae5f44f8d9cd909739550c12 to your computer and use it in GitHub Desktop.
parsing a string with C programming language strtok.c
This file contains hidden or 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
char *st,*buf, sep[]=" .,"; | |
buf=strdup(s.c_str()); | |
st=strtok(buf,sep); | |
while (st) { | |
st=strtok(0,sep); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment