锘??xml version="1.0" encoding="utf-8" standalone="yes"?>在线欧美电影,99re视频这里只有精品,亚洲精品一区二区三区蜜桃久http://m.shnenglu.com/masiyou/category/12019.html娌夋濆線浜嬬珛孌嬮槼錛屽綋鏃跺彧閬撴槸瀵誨父zh-cnThu, 08 Oct 2009 06:15:39 GMTThu, 08 Oct 2009 06:15:39 GMT60鍏充簬strtok鍑芥暟http://m.shnenglu.com/masiyou/archive/2009/10/07/98038.html嫻敓濡傛ⅵ嫻敓濡傛ⅵWed, 07 Oct 2009 11:14:00 GMThttp://m.shnenglu.com/masiyou/archive/2009/10/07/98038.htmlhttp://m.shnenglu.com/masiyou/comments/98038.htmlhttp://m.shnenglu.com/masiyou/archive/2009/10/07/98038.html#Feedback0http://m.shnenglu.com/masiyou/comments/commentRss/98038.htmlhttp://m.shnenglu.com/masiyou/services/trackbacks/98038.html#include <string.h> #include <stdio.h>
int main(void) { char input[16] = "abc,dhh,eee"; char *p;
/* strtok places a NULL terminator in front of the token, if found */ p = strtok(input, ","); if (p) printf("%s\n", p);
/* A second call to strtok using a NULL as the first parameter returns a pointer to the character following the token */ p = strtok(NULL, ","); if (p) printf("%s\n", p);
p = strtok(NULL, ","); if (p) printf("%s\n", p); return 0; }
MSDN涓婄殑鍘熻瘽錛? On the first call to strtok, the function skips leading delimiters and returns a pointer to the first token in strToken, terminating the token with a null character. More tokens can be broken out of the remainder of strToken by a series of calls to strtok. Each call to strtok modifies strToken by inserting a null character after the token returned by that call. To read the next token from strToken, call strtok with a NULL value for the strToken argument. The NULL strToken argument causes strtok to search for the next token in the modified strToken. The strDelimit argument can take any value from one call to the next so that the set of delimiters may vary.