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

NAME

6       wcscoll,  wscoll  -  wide  character  string comparison using collating
7       information
8

SYNOPSIS

10       #include <wchar.h>
11
12       int wcscoll(const wchar_t *ws1, const wchar_t *ws2);
13
14
15       int wscoll(const wchar_t *ws1, const wchar_t *ws2);
16
17

DESCRIPTION

19       The wcscoll() and  wscoll() functions compare the wide character string
20       pointed  to by ws1 to the wide character string pointed to by ws2, both
21       interpreted as appropriate to the LC_COLLATE category  of  the  current
22       locale.
23
24
25       The wcscoll() and wscoll() functions do not change the setting of errno
26       if successful.
27
28
29       An application wanting to check for error situations should  set  errno
30       to  0  before  calling  wcscoll() or wscoll().  If errno is non-zero on
31       return, an error has occurred.
32

RETURN VALUES

34       Upon successful completion, wcscoll() and wscoll()  return  an  integer
35       greater than, equal to, or less than 0, depending upon whether the wide
36       character string pointed to by ws1 is greater than, equal to,  or  less
37       than  the wide character string pointed to by ws2, when both are inter‐
38       preted as appropriate to the current locale. On  error,  wcscoll()  and
39       wscoll()  may set errno, but no return value is reserved to indicate an
40       error.
41

ERRORS

43       The wcscoll() and wscoll() functions may fail if:
44
45       EINVAL    The ws1 or ws2 arguments contain wide character codes outside
46                 the domain of the collating sequence.
47
48

USAGE

50       The  wcsxfrm(3C)  and  wcscmp(3C)  functions should be used for sorting
51       large lists.
52

ATTRIBUTES

54       See attributes(5) for descriptions of the following attributes:
55
56
57
58
59       ┌─────────────────────────────┬─────────────────────────────┐
60       │ATTRIBUTE TYPE               │ATTRIBUTE VALUE              │
61       ├─────────────────────────────┼─────────────────────────────┤
62       │CSI                          │Enabled                      │
63       ├─────────────────────────────┼─────────────────────────────┤
64       │Interface Stability          │wcscoll() is Standard        │
65       ├─────────────────────────────┼─────────────────────────────┤
66       │MT-Level                     │MT-Safe with exceptions      │
67       └─────────────────────────────┴─────────────────────────────┘
68
69
70       The wcscoll() and wscoll() functions  can  be  used  safely  in  multi‐
71       threaded  applications  as long as setlocale(3C) is not being called to
72       change the locale.
73

SEE ALSO

75       setlocale(3C), wcscmp(3C), wcsxfrm(3C), attributes(5), standards(5)
76
77
78
79SunOS 5.11                        14 Aug 2002                      wcscoll(3C)
Impressum