HP C/iX Library Reference Manual (30026-90004)

334 Chapter5
HP C/iX Library Function Descriptions
strcoll
strcoll
Compares two strings, interpreting them as appropriate for the current locale. This
function is generally used in conjunction with Native Language Support (NLS).
Syntax
#include <string.h>
int strcoll(const char *
s1
, const char *
s2
);
Parameters
s1
A pointer to the first string.
s2
A pointer to the second string.
Return Values
> 0 The
s1
parameter is greater than
s2
.
= 0 The
s1
parameter is equal to
s2
.
< 0 The
s1
parameter is less than
s2
.
Description
The strcoll function returns an integer greater than, equal to, or less than zero,
indicating that the string pointed to by
s1
is greater than, equal to, or less than the string
pointed to by
s2
. Both strings are interpreted as appropriate to the LC_COLLATE category of
the current locale.
See Also
strcmp(), strncmp(), memcmp(), ANSI C 4.11.4.3