Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

strcoll - Compare two strings

&pagelevel(4)&pagelevel

Definition

#include <string.h>

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

strcoll compares strings s1 and s2 lexically. The lexical sequence of the individual
characters is interpreted according to the LC_COLLATE category of the current locale.

Return val.

< 0

= 0

> 0

s1 is lexically less than s2.

s1 and s2 are lexically equal.

s1 is lexically greater than s2.

Notes

Strings terminated with the null byte (\0) are expected as arguments.

The locale concept is described in detail in chapter “Locale”.

Example

See also

See under strxfrm.

setlocale, strxfrm