⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 wcstok.html

📁 unix 下的C开发手册,还用详细的例程。
💻 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 &reg; Specification, Version 2<br>Copyright &copy; 1997 The Open Group</font></center><hr size=2 noshade><h4><a name = "tag_000_010_626">&nbsp;</a>NAME</h4><blockquote>wcstok - split wide-character string into tokens</blockquote><h4><a name = "tag_000_010_627">&nbsp;</a>SYNOPSIS</h4><blockquote><pre><code>#include &lt;<a href="wchar.h.html">wchar.h</a>&gt;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">&nbsp;</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">&nbsp;</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">&nbsp;</a>ERRORS</h4><blockquote>No errors are defined.</blockquote><h4><a name = "tag_000_010_631">&nbsp;</a>EXAMPLES</h4><blockquote>None.</blockquote><h4><a name = "tag_000_010_632">&nbsp;</a>APPLICATION USAGE</h4><blockquote>None.</blockquote><h4><a name = "tag_000_010_633">&nbsp;</a>FUTURE DIRECTIONS</h4><blockquote>None.</blockquote><h4><a name = "tag_000_010_634">&nbsp;</a>SEE ALSO</h4><blockquote><i><a href="wchar.h.html">&lt;wchar.h&gt;</a></i>.</blockquote><hr size=2 noshade><center><font size=2>UNIX &reg; is a registered Trademark of The Open Group.<br>Copyright &copy; 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 + -