strcasecmp

Converts all characters to lowercase and then compares two strings

Local Servers:nonblocking
Remote Servers:N/A
Classification:ANSI
Service:String Manipulation

Syntax

  #include <string.h>  
   
  int strcasecmp (  
     const char  *s1,   
     const char  *s2);
  

Parameters

s1
(IN) Points to the first string to compare.
s2
(IN) Points to the second string to compare.

Return Values

Returns zero if the two strings match. Otherwise, it returns an integer less than or greater than zero, depending on whether s1 is lexicographically less than or greater than s2.

Remarks

strcasecmp is identical to strcmp, except that the characters of each string are converted to lowercase before comparison.

Each character is treated as if it is of type unsigned char, and NULL pointers are treated as pointers to empty strings.

See Also

strcmp, strcoll, strncasecmp