Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ wscoll(3I) — SunOS 5.3

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

colltbl(1M)

setlocale(3C)

wstring(3I)

wsxfrm(3I)

environ(5)

wscoll(3I)

NAME

wscoll − wide character string collation

SYNOPSIS

#include <widec.h>

int wscoll(const wchar_t ∗s1, const wchar_t ∗s2);

MT-LEVEL

Safe with exceptions

DESCRIPTION

wscoll() returns an integer greater than, equal to, or less than zero in direct correlation to whether string s1 is greater than, equal to, or less than the string s2.  The comparison is based on strings interpreted as appropriate to the program’s locale for category LC_COLLATE (see setlocale(3C)). 

Both wscoll() and wsxfrm(3I) provide for locale-specific string sorting.  wscoll() is intended for applications in which the number of comparisons per string is small.  When strings are to be compared a number of times, wsxfrm(3I) is a more appropriate function because the transformation process occurs only once. 

FILES

/usr/lib/locale/LC_COLLATE
LC_COLLATE database for locale

SEE ALSO

colltbl(1M), setlocale(3C), wstring(3I), wsxfrm(3I), environ(5)

NOTES

wscoll( ) can be used safely in a multi-thread application, as long as setlocale(3C) is not being called to change the locale. 

Sun Microsystems  —  Last change: 22 Jan 1993

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026