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

NAME

12       wcsxfrm - wide-character string transformation
13

SYNOPSIS

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

DESCRIPTION

22       The  wcsxfrm()  function  shall  transform  the  wide-character  string
23       pointed  to  by  ws2 and place the resulting wide-character string into
24       the array pointed to by ws1. The transformation shall be such  that  if
25       wcscmp()  is applied to two transformed wide strings, it shall return a
26       value greater than, equal to, or less  than  0,  corresponding  to  the
27       result  of  wcscoll()  applied  to the same two original wide-character
28       strings. No more than n wide-character codes shall be placed  into  the
29       resulting array pointed to by ws1, including the terminating null wide-
30       character code. If n is 0, ws1 is permitted to be a  null  pointer.  If
31       copying takes place between objects that overlap, the behavior is unde‐
32       fined.
33
34       The wcsxfrm() function shall not change the setting of  errno  if  suc‐
35       cessful.
36
37       Since  no return value is reserved to indicate an error, an application
38       wishing to check for error situations should set errno to 0, then  call
39       wcsxfrm(), then check errno.
40

RETURN VALUE

42       The wcsxfrm() function shall return the length of the transformed wide-
43       character string (not including  the  terminating  null  wide-character
44       code).  If  the  value returned is n or more, the contents of the array
45       pointed to by ws1 are unspecified.
46
47       On error, the wcsxfrm() function may set errno, but no return value  is
48       reserved to indicate an error.
49

ERRORS

51       The wcsxfrm() function may fail if:
52
53       EINVAL The  wide-character string pointed to by ws2 contains wide-char‐
54              acter codes outside the domain of the collating sequence.
55
56
57       The following sections are informative.
58

EXAMPLES

60       None.
61

APPLICATION USAGE

63       The transformation function is such that two transformed wide-character
64       strings can be ordered by wcscmp() as appropriate to collating sequence
65       information in the program's locale (category LC_COLLATE ).
66
67       The fact that when n is 0 ws1 is permitted to be a null pointer is use‐
68       ful  to  determine the size of the ws1 array prior to making the trans‐
69       formation.
70

RATIONALE

72       None.
73

FUTURE DIRECTIONS

75       None.
76

SEE ALSO

78       wcscmp(),    wcscoll(),    the    Base    Definitions     volume     of
79       IEEE Std 1003.1-2001, <wchar.h>
80
82       Portions  of  this text are reprinted and reproduced in electronic form
83       from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
84       --  Portable  Operating  System  Interface (POSIX), The Open Group Base
85       Specifications Issue 6, Copyright (C) 2001-2003  by  the  Institute  of
86       Electrical  and  Electronics  Engineers, Inc and The Open Group. In the
87       event of any discrepancy between this version and the original IEEE and
88       The  Open Group Standard, the original IEEE and The Open Group Standard
89       is the referee document. The original Standard can be  obtained  online
90       at http://www.opengroup.org/unix/online.html .
91
92
93
94IEEE/The Open Group                  2003                          WCSXFRM(3P)
Impressum