strsep.c
资源名称:NETVIDEO.rar [点击查看]
上传用户:sun1608
上传日期:2007-02-02
资源大小:6116k
文件大小:0k
源码类别:
流媒体/Mpeg4/MP4
开发平台:
Visual C++
- #include "systems.h"
- #ifndef HAVE_STRSEP
- char *strsep (char **sptr, const char *delim)
- {
- char *start, *ret;
- start = ret = *sptr;
- if ((ret == NULL) || ret == ' ') {
- return (NULL);
- }
- while (*ret != ' ' &&
- strchr(delim, *ret) == NULL) {
- ret++;
- }
- if (*ret == ' ') {
- *sptr = NULL;
- } else {
- *ret = ' ';
- ret++;
- *sptr = ret;
- }
- return (start);
- }
- #endif