Next Previous Contents

3.155 strncmp

Function

Compare two strings.

Header

string.h

Declaration

int __fastcall__ strncmp (const char* s1, const char* s2, size_t count);

Description

The strncmp function compares not more than count characters of the two strings passed as parameters. It returns a value that is less than zero if the first count characters of s1 are less than s2, zero if they are identical, and a value greater than zero they are greater.

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, strcmp, strcoll, stricmp strxfrm

Example

None.


Next Previous Contents