1WCSXFRM(3P)                POSIX Programmer's Manual               WCSXFRM(3P)
2
3
4

PROLOG

6       This  manual  page is part of the POSIX Programmer's Manual.  The Linux
7       implementation of this interface may differ (consult the  corresponding
8       Linux  manual page for details of Linux behavior), or the interface may
9       not be implemented on Linux.
10
11

NAME

13       wcsxfrm, wcsxfrm_l — wide-character string transformation
14

SYNOPSIS

16       #include <wchar.h>
17
18       size_t wcsxfrm(wchar_t *restrict ws1, const wchar_t *restrict ws2,
19           size_t n);
20       size_t wcsxfrm_l(wchar_t *restrict ws1, const wchar_t *restrict ws2,
21           size_t n, locale_t locale);
22

DESCRIPTION

24       For wcsxfrm(): The functionality described on this  reference  page  is
25       aligned  with the ISO C standard. Any conflict between the requirements
26       described here and the ISO C standard is unintentional. This volume  of
27       POSIX.1‐2008 defers to the ISO C standard.
28
29       The  wcsxfrm() and wcsxfrm_l() functions shall transform the wide-char‐
30       acter string pointed to by ws2 and place the  resulting  wide-character
31       string  into  the array pointed to by ws1.  The transformation shall be
32       such that if wcscmp() is applied to two transformed  wide  strings,  it
33       shall  return  a  value  greater than, equal to, or less than 0, corre‐
34       sponding to the result of wcscoll() and wcscoll_l() applied to the same
35       two  original  wide-character strings, and the same LC_COLLATE category
36       of the current locale or the locale  object  locale,  respectively.  No
37       more  than  n  wide-character  codes shall be placed into the resulting
38       array pointed to by ws1, including the terminating null  wide-character
39       code.  If  n  is  0,  ws1 is permitted to be a null pointer. If copying
40       takes place between objects that overlap, the behavior is undefined.
41
42       The wcsxfrm() and wcsxfrm_l() functions shall not change the setting of
43       errno if successful.
44
45       Since  no return value is reserved to indicate an error, an application
46       wishing to check for error situations should set errno to 0, then  call
47       wcsxfrm() or wcsxfrm_l(), then check errno.
48
49       The  behavior is undefined if the locale argument to wcsxfrm_l() is the
50       special locale object LC_GLOBAL_LOCALE or is not a valid locale  object
51       handle.
52

RETURN VALUE

54       The  wcsxfrm() and wcsxfrm_l() functions shall return the length of the
55       transformed wide-character string (not including the  terminating  null
56       wide-character  code). If the value returned is n or more, the contents
57       of the array pointed to by ws1 are unspecified.
58
59       On error, the wcsxfrm() and wcsxfrm_l() functions may set errno, but no
60       return value is reserved to indicate an error.
61

ERRORS

63       These functions may fail if:
64
65       EINVAL The  wide-character string pointed to by ws2 contains wide-char‐
66              acter codes outside the domain of the collating sequence.
67
68       The following sections are informative.
69

EXAMPLES

71       None.
72

APPLICATION USAGE

74       The transformation function is such that two transformed wide-character
75       strings can be ordered by wcscmp() as appropriate to collating sequence
76       information in the current locale (category LC_COLLATE).
77
78       The fact that when n is 0 ws1 is permitted to be a null pointer is use‐
79       ful  to  determine the size of the ws1 array prior to making the trans‐
80       formation.
81

RATIONALE

83       None.
84

FUTURE DIRECTIONS

86       None.
87

SEE ALSO

89       wcscmp(), wcscoll()
90
91       The Base Definitions volume of POSIX.1‐2008, <wchar.h>
92
94       Portions of this text are reprinted and reproduced in  electronic  form
95       from IEEE Std 1003.1, 2013 Edition, Standard for Information Technology
96       -- Portable Operating System Interface (POSIX),  The  Open  Group  Base
97       Specifications Issue 7, Copyright (C) 2013 by the Institute of Electri‐
98       cal and Electronics Engineers,  Inc  and  The  Open  Group.   (This  is
99       POSIX.1-2008  with  the  2013  Technical Corrigendum 1 applied.) In the
100       event of any discrepancy between this version and the original IEEE and
101       The  Open Group Standard, the original IEEE and The Open Group Standard
102       is the referee document. The original Standard can be  obtained  online
103       at http://www.unix.org/online.html .
104
105       Any  typographical  or  formatting  errors that appear in this page are
106       most likely to have been introduced during the conversion of the source
107       files  to  man page format. To report such errors, see https://www.ker
108       nel.org/doc/man-pages/reporting_bugs.html .
109
110
111
112IEEE/The Open Group                  2013                          WCSXFRM(3P)
Impressum