摘要: 博客原文地址:http://www.2cto.com/kf/201203/124775.html经常碰到字符串分割的问题,这里总结下,也方便我以后使用。一、用strtok函数进行字符串分割原型: char *strtok(char *str, const char *delim);功能:分解字符串为一组字符串。参数说明:str为要分解的字符串,delim为分隔符字符串。返回值:从str开头开始的一个个被分割的串。当没有被分割的串时则返回NULL。示例:1 //借助strtok实现split2 #include <string.h>3 #include <stdio.h> 阅读全文
posted @ 2012-08-27 11:51 wmx3ng 阅读(234) 评论(0) 推荐(0) 编辑