token.c
来自「《c与指针》书的代码 是我学习这本书时候敲出来的」· C语言 代码 · 共 19 行
C
19 行
/*
** Extract whitespace-delimited tokens from a character array and
** print them one per line.
*/
#include <stdio.h>
#include <string.h>
void
print_tokens( char *line )
{
static char whitespace[] = " \t\f\r\v\n";
char *token;
for( token = strtok( line, whitespace );
token != NULL;
token = strtok( NULL, whitespace ) )
printf( "Next token is %s\n", token );
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?