Guardian Native C Library Calls Reference Manual (G06.28+, H06.05+)
Guardian Native C Library Calls (s) strcoll(3)
NAME
strcoll - Compares strings using locale collation
LIBRARY
G-series native Guardian processes: $SYSTEM.SYSnn.ZCRTLSRL
G-series native OSS processes: /G/system/sysnn/zcrtlsrl
H-series native Guardian processes: $SYSTEM.ZDLLnnn.ZCRTLDLL
H-series OSS processes: /G/system/zdllnnn/zcrtldll
SYNOPSIS
#include <string.h>
int strcoll(
const char *s1,
const char *s2);
PARAMETERS
s1 Specifies first string to be compared.
s2 Specifies second string to be compared.
DESCRIPTION
The strcoll() function compares the string pointed to by the s1 parameter with the string pointed
to by the s2 parameter, both interpreted as appropriate to the LC_COLLATE category of the
current locale. The sign of a nonzero value returned by strcoll() is determined by the relative
ordering within the current collating sequence of the first pair of characters that differ in the
objects under comparison.
RETURN VALUES
Upon successful completion, the strcoll() function returns an integer whose value is greater than,
equal to, or less than 0 (zero), according to whether the s1 string is greater than, equal to, or less
than the s2 string. When a successful comparison cannot be made, this function return a value of
0 (zero).
ERRORS
If the following condition occurs, this function sets errno to the corresponding value.
[EINVAL] The string pointed to by the s1 or s2 parameter contains characters outside the
domain of the collating sequence.
RELATED INFORMATION
Functions: setlocale(3), strcat(3), strxfrm(3), wcscoll(3).
527192-007 Hewlett-Packard Company 6−55