1wcsxfrm(3C)              Standard C Library Functions              wcsxfrm(3C)
2
3
4

NAME

6       wcsxfrm, wsxfrm - wide character string transformation
7

SYNOPSIS

9       #include <wchar.h>
10
11       size_t wcsxfrm(wchar_t *ws1, const wchar_t *ws2, size_t n);
12
13
14       size_t wsxfrm(wchar_t *ws1, const wchar_t *ws2, size_t n);
15
16

DESCRIPTION

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

RETURN VALUES

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

ERRORS

51       The wcsxfrm() and wsxfrm() functions may fail if:
52
53       EINVAL    The  wide  character  string pointed to by ws2 contains wide-
54                 character codes outside the domain of the collating sequence.
55
56

USAGE

58       The transformation function is such that  two transformed wide  charac‐
59       ter  strings  can  be  ordered  by the wcscmp() or wscmp() functions as
60       appropriate to collating sequence information in the  program's  locale
61       (category LC_COLLATE).
62
63
64       The  fact that when  n is 0, ws1 is permitted to be a null pointer,  is
65       useful to determine the size of the  ws1  array  prior  to  making  the
66       transformation.
67

ATTRIBUTES

69       See attributes(5) for descriptions of the following attributes:
70
71
72
73
74       ┌─────────────────────────────┬─────────────────────────────┐
75       │ATTRIBUTE TYPE               │ATTRIBUTE VALUE              │
76       ├─────────────────────────────┼─────────────────────────────┤
77       │CSI                          │Enabled                      │
78       ├─────────────────────────────┼─────────────────────────────┤
79       │Interface Stability          │wcsxfrm() is Standard        │
80       ├─────────────────────────────┼─────────────────────────────┤
81       │MT-Level                     │MT-Safe with exceptions      │
82       └─────────────────────────────┴─────────────────────────────┘
83
84
85       The  wcsxfrm()  and  wsxfrm()  functions  can  be used safely in multi‐
86       threaded applications as long as setlocale(3C) is not being  called  to
87       change the locale.
88

SEE ALSO

90       setlocale(3C),    wcscmp(3C),   wcscoll(3C),   wscmp(3C),   wscoll(3C),
91       attributes(5), standards(5)
92
93
94
95SunOS 5.11                        1 Nov 2003                       wcsxfrm(3C)
Impressum