📄 wcsxfrm.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><html><head><!-- Copyright 1997 The Open Group, All Rights Reserved --><title>wcsxfrm</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_680"> </a>NAME</h4><blockquote>wcsxfrm - wide-character string transformation</blockquote><h4><a name = "tag_000_010_681"> </a>SYNOPSIS</h4><blockquote><pre><code>#include <<a href="wchar.h.html">wchar.h</a>>size_t wcsxfrm(wchar_t *<i>ws1</i>, const wchar_t *<i>ws2</i>, size_t <i>n</i>);</code></pre></blockquote><h4><a name = "tag_000_010_682"> </a>DESCRIPTION</h4><blockquote>The<i>wcsxfrm()</i>function transforms the wide-character string pointed to by<i>ws2</i>and places the resulting wide-character string into the array pointed to by<i>ws1</i>.The transformation is such that if<i><a href="wcscmp.html">wcscmp()</a></i>is applied to two transformed wide strings, it returns a value greater than,equal to or less than 0, corresponding to the result of<i><a href="wcscoll.html">wcscoll()</a></i>applied to the same two original wide-character strings. No more than<i>n</i>wide-character codes are placed into the resulting array pointed to by<i>ws1</i>,including the terminating null wide-character code. If<i>n</i>is 0,<i>ws1</i>is permitted to be a null pointer. If copying takes place between objectsthat overlap, the behaviour is undefined.<p>The<i>wcsxfrm()</i>function will not change the setting of <b>errno</b>if successful.</blockquote><h4><a name = "tag_000_010_683"> </a>RETURN VALUE</h4><blockquote>The<i>wcsxfrm()</i>function returns the length of the transformed wide-character string (notincluding the terminating null wide-character code).If the value returned is<i>n</i>or more, the contents of the array pointed to by<i>ws1</i>are indeterminate.<p>On error, the<i>wcsxfrm()</i>function returns(<b>size</b>_<b>t</b>)-1, and sets<i>errno</i>to indicate the error.</blockquote><h4><a name = "tag_000_010_684"> </a>ERRORS</h4><blockquote>The<i>wcsxfrm()</i>function may fail if:<dl compact><dt>[EINVAL]<dd>The wide-character string pointed to by<i>ws2</i>contains wide-character codes outside the domain of thecollating sequence.</dl></blockquote><h4><a name = "tag_000_010_685"> </a>EXAMPLES</h4><blockquote>None.</blockquote><h4><a name = "tag_000_010_686"> </a>APPLICATION USAGE</h4><blockquote>The transformation function is such thattwo transformed wide-character strings can be ordered by<i><a href="wcscmp.html">wcscmp()</a></i>as appropriate to collating sequence information in theprogram's locale (category <a href="../xbd/locale.html#tag_005_003_002">LC_COLLATE</a>).<p>The fact that when<i>n</i>is 0,<i>ws1</i>is permitted to be a null pointer,is useful to determine the size of the<i>ws1</i>array prior to making the transformation.<p>Because no return value is reserved to indicate an error, an applicationwishing to check for error situations should set<i>errno</i>to 0, then call<i>wcsxfrm()</i>,then check<i>errno</i>.</blockquote><h4><a name = "tag_000_010_687"> </a>FUTURE DIRECTIONS</h4><blockquote>None.</blockquote><h4><a name = "tag_000_010_688"> </a>SEE ALSO</h4><blockquote><i><a href="wcscmp.html">wcscmp()</a></i>,<i><a href="wcscoll.html">wcscoll()</a></i>,<i><a href="wchar.h.html"><wchar.h></a></i>.</blockquote><h4>DERIVATION</h4><blockquote>Derived from the MSE working draft.</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 + -