AcerX
09-20-2002, 04:08 PM
Hi,
I'm trying to tokenize a string, for example"This is a <test>".
I used
char string[]="This is a <test>";
tokenPtr=strtok(string," ");
while(tokenPtr!=NULL){
printf("%s\n", tokenPtr);
tokenPtr=strtok(NULL, " ");
The output is ok except I want to eliminate the term with < >.
Can anyone tell me how do I make the function skip the unwanted term?
I'm trying to tokenize a string, for example"This is a <test>".
I used
char string[]="This is a <test>";
tokenPtr=strtok(string," ");
while(tokenPtr!=NULL){
printf("%s\n", tokenPtr);
tokenPtr=strtok(NULL, " ");
The output is ok except I want to eliminate the term with < >.
Can anyone tell me how do I make the function skip the unwanted term?