Next Previous Contents

## 3.142 strcoll

> Function

>   Compare two strings.

> Header

>   `string.h`

> Declaration

>   `int __fastcall__ strcoll (const char* s1, const char* s2);`

> Description

>   The `strcoll` function compares the two strings passed as parameters, according to the collating sequence set by `setlocale`. It returns a value that is less than zero if `s1` is less than `s2`, zero if `s1` is the same as `s2`, and a value greater than zero if `s1` is greater than `s2`.

> Limits

>   - The function is only available as fastcall function, so it may only be used in presence of a prototype.
> Availability

>   ISO 9899

> See also

>   setlocale, strcasecmp, strcmp, stricmp, strncmp strxfrm

> Example

>   None.

Next Previous Contents