鼠标指针 源氏:c语言查找由在第二个串中指定的分界符分隔开的单词函数程序
来源:百度文库 编辑:九乡新闻网 时间:2024/05/04 19:51:24
函数名: strtok
功 能: 查找由在第二个串中指定的分界符分隔开的单词
用 法: char *strtok(char *str1, char *str2);
程序例:
#include
#include
int main(void)
{
char input[16] = "abc,d";
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);
return 0;
}
功 能: 查找由在第二个串中指定的分界符分隔开的单词
用 法: char *strtok(char *str1, char *str2);
程序例:
#include
#include
int main(void)
{
char input[16] = "abc,d";
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);
return 0;
}
c语言查找由在第二个串中指定的分界符分隔开的单词函数程序
c语言在串中查找指定字符的最后一个出现函数
c语言在串中查找指定字符串的第一次出现函数
c语言在串中查找给定字符集中的字符函数
c语言将串转换为长整数函数程序
c语言交换字节函数程序
C语言的内联函数的作用
C语言的printf格式化输出函数
c语言串倒转函数
c语言串比较函数
第二章 C语言的数据类型
一个女工程师用C语言写的爱情函数
C语言的那些小秘密之函数指针
C语言 自定义函数返回数组的问题
c语言返回指向错误信息字符串的指针函数
C语言中操作字符串的一些函数源代码
C语言函数声明
C语言的6个标准宏
EXCEL中查找函数的妙用
C语言的那些小秘密之变参函数的实现
C语言 时间函数分析
C语言字符串函数全
C语言字符串函数大全
请教一个关于printf函数和求余数的问题 - C语言论坛 - 编程论坛