📄 wcstok.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><html><head><!-- Copyright 1997 The Open Group, All Rights Reserved --><title>wcstok</title></head><body bgcolor=white><center><font size=2>The Single UNIX ® Specification, Version 2<br>Copyright © 1997 The Open Group</font></center><hr size=2 noshade><h4><a name = "tag_000_010_626"> </a>NAME</h4><blockquote>wcstok - split wide-character string into tokens</blockquote><h4><a name = "tag_000_010_627"> </a>SYNOPSIS</h4><blockquote><pre><code>#include <<a href="wchar.h.html">wchar.h</a>>wchar_t *wcstok(wchar_t *<i>ws1</i>, const wchar_t *<i>ws2</i>, wchar_t **ptr);</code></pre></blockquote><h4><a name = "tag_000_010_628"> </a>DESCRIPTION</h4><blockquote>A sequence of calls to<i>wcstok()</i>breaks the wide-character string pointed to by<i>ws1</i>into a sequence of tokens, each of which is delimited by awide-character code from the wide-character string pointed to by<i>ws2</i>.The third argument points to a caller-provided <b>wchar_t</b>pointer into which the<i>wcstok()</i>function stores information necessary for it to continue scanning thesame wide-character string.<p>The first call in the sequence has<i>ws1</i>as its first argument, and is followed by calls with a nullpointer as their first argument.The separator string pointed to by<i>ws2</i>may be different from call to call.<p>The first call in the sequence searches the wide-character string pointed to by<i>ws1</i>for the first wide-character code that is<i>not</i>contained in the current separator string pointed to by<i>ws2</i>.If no such wide-character code is found, then there are no tokens in thewide-character string pointed to by<i>ws1</i>and<i>wcstok()</i>returns a null pointer. If such a wide-character code is found, it is thestart of the first token.<p>The<i>wcstok()</i>function then searches from there for a wide-character code that<i>is</i>contained in the current separator string.If no such wide-character code is found, the current tokenextends to the end of the wide-character string pointed to by<i>ws1</i>,and subsequent searches for a token will return a null pointer.If such a wide-character code is found, it is overwritten by a null wide-character, which terminates the current token.The<i>wcstok()</i>function saves a pointer to the following wide-character code, from which thenext search for a token will start.<p>Each subsequent call, with a null pointer as the value of thefirst argument, starts searching from the saved pointer andbehaves as described above.<p>The implementation will behave as if no function calls<i>wcstok()</i>.</blockquote><h4><a name = "tag_000_010_629"> </a>RETURN VALUE</h4><blockquote>Upon successful completion, the<i>wcstok()</i>function returns a pointer to the first wide-character code of a token.Otherwise, if there is no token,<i>wcstok()</i>returns a null pointer.</blockquote><h4><a name = "tag_000_010_630"> </a>ERRORS</h4><blockquote>No errors are defined.</blockquote><h4><a name = "tag_000_010_631"> </a>EXAMPLES</h4><blockquote>None.</blockquote><h4><a name = "tag_000_010_632"> </a>APPLICATION USAGE</h4><blockquote>None.</blockquote><h4><a name = "tag_000_010_633"> </a>FUTURE DIRECTIONS</h4><blockquote>None.</blockquote><h4><a name = "tag_000_010_634"> </a>SEE ALSO</h4><blockquote><i><a href="wchar.h.html"><wchar.h></a></i>.</blockquote><hr size=2 noshade><center><font size=2>UNIX ® is a registered Trademark of The Open Group.<br>Copyright © 1997 The Open Group<br> [ <a href="../index.html">Main Index</a> | <a href="../xshix.html">XSH</a> | <a href="../xcuix.html">XCU</a> | <a href="../xbdix.html">XBD</a> | <a href="../cursesix.html">XCURSES</a> | <a href="../xnsix.html">XNS</a> ]</font></center><hr size=2 noshade></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -