strcoll()

compare two strings using LC_COLLATE 

Function


SYNOPSIS

#include <string.h>

int strcoll(const char *s1, const char *s2);


DESCRIPTION

The strcoll() function compares the string pointed to by s1 to the string pointed to by s2. Both s1 and s2 are interpreted as appropriate for the LC_COLLATE category of the current locale.


PARAMETERS

s1 

Is the null-terminated string to compare.

s2 

Is the null-terminated string to compare.


RETURN VALUES

The function strcoll() returns a positive integer if string s1 is lexically greater than string s2; zero if the two strings are identical; and a negative integer if string s1 is lexically less than string s2, as defined by the current locale.


CONFORMANCE

ANSI/ISO 9899-1990.


MULTITHREAD SAFETY LEVEL

MT-Safe, with exceptions.

This function is MT-Safe as long as no thread calls setlocale() while this function is executing.


PORTING ISSUES

None.


AVAILABILITY

MKS Toolkit for Professional Developers
MKS Toolkit for Enterprise Developers
MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

Functions:
memcmp(), strcasecmp(), strcmp(), strncasecmp(), strncmp()


MKS Toolkit 9.3 Documentation Build 6.