Skip to content

Instantly share code, notes, and snippets.

@Nolski
Created October 11, 2014 18:16
Show Gist options
  • Save Nolski/8c9064581351c917627d to your computer and use it in GitHub Desktop.
Save Nolski/8c9064581351c917627d to your computer and use it in GitHub Desktop.
int j = ;
char* linksep = "/";
char* linktok = strtok(tok, linksep);
char* linkstate = NULL;
char* linkclass = NULL;
while(linktok != NULL) {
if(j == 0)
linkstate = linktok;
if(j == 1)
linkclass = linktok;
linktok = strtok(NULL, linksep);
j++;
}
printf("linkstate: %s, linkclass: %s \n", linkstate, linkclass);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment