strcmp()

compare two strings 

Function


SYNOPSIS

#include <string.h>

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


DESCRIPTION

The strcmp() function compares the string pointed to by s1 to the string pointed to by s2.


PARAMETERS

s1 

Points to a null-terminated string to compare.

s2 

Points to a null=terminated string to compare.


RETURN VALUES

The function strcmp() 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.


CONFORMANCE

ANSI/ISO 9899-1990.


MULTITHREAD SAFETY LEVEL

MT-Safe.


PORTING ISSUES

None.


AVAILABILITY

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


SEE ALSO

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


PTC MKS Toolkit 10.5 Documentation Build 40.