剑网三转阵营问题:ANSI C 的strtok的实现
来源:百度文库 编辑:中财网 时间:2024/04/29 11:58:12
/*
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
* See the copyright notice in the ACK home directory, in the file "Copyright".
*/
/* $Header: strtok.c,v 1.2 90/08/28 13:54:38 eck Exp $ */
#include
char *
strtok(register char *string, const char *separators)
{
register char *s1, *s2;
static char *savestring;
if (string == NULL) {
string = savestring;
if (string == NULL) return (char *)NULL;
}
s1 = string + strspn(string, separators);
if (*s1 == '\0') {
savestring = NULL;
return (char *)NULL;
}
s2 = strpbrk(s1, separators);
if (s2 != NULL)
*s2++ = '\0';
savestring = s2;
return s1;
}
/* * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. * See the copyright notice in the ACK home directory, in the file "Copyright". */ /* $Header: strtok.c,v 1.2 90/08/28 13:54:38 eck Exp $ */ #include char * strtok(register char *string, const char *separators) { register char *s1, *s2; static char *savestring; if (string == NULL) { string = savestring; if (string == NULL) return (char *)NULL; } s1 = string + strspn(string, separators); if (*s1 == '\0') { savestring = NULL; return (char *)NULL; } s2 = strpbrk(s1, separators); if (s2 != NULL) *s2++ = '\0'; savestring = s2; return s1; }
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
* See the copyright notice in the ACK home directory, in the file "Copyright".
*/
/* $Header: strtok.c,v 1.2 90/08/28 13:54:38 eck Exp $ */
#include
char *
strtok(register char *string, const char *separators)
{
register char *s1, *s2;
static char *savestring;
if (string == NULL) {
string = savestring;
if (string == NULL) return (char *)NULL;
}
s1 = string + strspn(string, separators);
if (*s1 == '\0') {
savestring = NULL;
return (char *)NULL;
}
s2 = strpbrk(s1, separators);
if (s2 != NULL)
*s2++ = '\0';
savestring = s2;
return s1;
}
/* * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. * See the copyright notice in the ACK home directory, in the file "Copyright". */ /* $Header: strtok.c,v 1.2 90/08/28 13:54:38 eck Exp $ */ #include
borland c ++和vc++哪个对ansi支持的较好?
如何批量实现txt文档由Unicode向ANSI的编码方式转换
有没有国外的(英语)C语言的教材,最好是ANSI C
ANSI编码是怎么样的?
ANSI C和我们通常所说的C有什么区别?
ANSI光亮度和亮度的区别是什么
ANSI的功能、角色、责任分别是什么
C语言 库函数的实现???
MP3的阅读功能只支持ANSI格式的文本文件???
strtok函数
请问ANSI玛的二分之二怎么输入
ANSI 和unicode 的区别和联系是什么?
ANSI 压缩算法C语言源码
请问hash查询算法的c实现
简单电子记事本的实现C 源代码
用C语言实现电力线的输出
怎样用C实现以下的功能
为什么在网上搜索不在ANSI-92 SQL的标准参考手册、教程之类的呢?
有什么方法能把UTF-8的编码批量转换成ANSI的编码
急需可以把txt文档的可编辑ANSI文字转换成Unicode的繁体文字
有没有tc++3.0以上的最新版本,支持最新ansi标准的?
我的vc头文件是旧的,是ANSI前方式,怎么办?
求一个可以批量把UTF-8编码的文本文件转换成ANSI编码的软件
五金工具钢丝钳等一些工具的图案下面有一些“ANSI 1072.20M"是什么意思?