wcstok
来自cppreference.com
该页由英文版wiki使用Google Translate机器翻译而来。
该翻译可能存在错误或用词不当。鼠标停留在文本上可以看到原版本。你可以帮助我们修正错误或改进翻译。参见说明请点击这里. |
在头文件 <wchar.h> 中定义
|
||
wchar_t* wcstok( wchar_t* str, const wchar_t* delim ); |
||
指向一个空结尾的宽字符串中查找下一个标记
str
。分隔字符识别null结尾的宽字符串所指向的delim
.原文:
Finds the next token in a null-terminated wide string pointed to by
str
. The separator characters are identified by null-terminated wide string pointed to by delim
.如果str != NULL,搜索的第一个宽字符,这是“不”分离的功能。这个字符开头的“令牌”。然后,该函数搜索第一个分隔符。这个字符是“端的令牌”。功能终止,并返回,如果最终的NULL'端的令牌“被发现之前遇到的
str
。否则,指针“的令牌”被保存在一个静态的位置,以供以后调用。这个角色会被替换为一个NULL字符,该函数返回一个指针,指向“开始的令牌”.....原文:
If str != NULL, the function searches for the first wide character which is not separator. This character is the beginning of the token. Then the function searches for the first separator character. This character is the end of the token. Function terminates and returns NULL if end of
str
is encountered before end of the token is found. Otherwise, a pointer to end of the token is saved in a static location for subsequent invocations. This character is then replaced by a NULL-character and the function returns a pointer to the beginning of the token.如果str == NULL,继续留在以前的调用函数。的行为是一样的,如果以前存储的指针传递str.
原文:
If str == NULL, the function continues from where it left in previous invocation. The behavior is the same as if the previously stored pointer is passed as str.
目录 |
[编辑] 参数
str | - | 指针,以空结尾的宽字符串来标记
原文: pointer to the null-terminated wide string to tokenize |
delim | - | 指针,以NULL结尾的宽字符串识别分隔符
原文: pointer to the null-terminated wide string identifying delimiters |
[编辑] 返回值
指向一个令牌,如果检查的字符串的末尾没有遇到的开头的指针。否则,返回NULL
原文:
Pointer to the beginning of a token if the end of examined string has not been encountered. Otherwise returns NULL>
[编辑] 请注意
是不是线程安全的功能.
[编辑] 示例
本章尚未完成 原因:暂无示例 |
[编辑] 另请参阅
C++ documentation for wcstok
|