打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
c语言查找由在第二个串中指定的分界符分隔开的单词函数程序
函数名: strtok 
功  能: 查找由在第二个串中指定的分界符分隔开的单词 
用  法: char *strtok(char *str1, char *str2); 
程序例: 
#include <string.h> 
#include <stdio.h> 
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; 

本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
strtok函数的使用
标准库
C++ split,字符串分割
strtok
strtok.c函数
获得变动长度sessionid的关联函数 strtok()
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服