Next Previous Contents

## 3.144 strcmp

> Function

>   Compare two strings.

> Header

>   `string.h`

> Declaration

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

> Description

>   The `strcmp` function compares the two strings passed as parameters. 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

>   strcasecmp, strcoll, stricmp, strncmp strxfrm

> Example

>   None.

Next Previous Contents