Skip to content

Instantly share code, notes, and snippets.

@dennisbot
Created July 31, 2017 17:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dennisbot/c7a7998aae5f44f8d9cd909739550c12 to your computer and use it in GitHub Desktop.
Save dennisbot/c7a7998aae5f44f8d9cd909739550c12 to your computer and use it in GitHub Desktop.
parsing a string with C programming language strtok.c
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