strcmpi

Compares, with case insensitivity, two strings (implemented for NetWare® 3.11 and above)

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

Syntax

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

Return Values

The strcmpi function returns an integer less than, equal to, or greater than 0, indicating that the string pointed to by s1 is less than, equal to, or greater than the string pointed to by s2. All uppercase characters from s1 and s2 are mapped to lowercase characters for the purposes of doing the comparison.

Remarks

The strcmpi function compares, with case insensitivity, the string pointed to by s1 to the string pointed to by s2.

See Also

strcmp, stricmp, strncmp, strnicmp

Example

  #include <string.h>  
  main()  
  {  
     printf( "%d\n", stricmp( "AbCDEF", "abcdef" ) );  
     printf( "%d\n", stricmp( "abcdef", "ABC"    ) );  
     printf( "%d\n", stricmp( "abc",    "ABCdef" ) );  
     printf( "%d\n", stricmp( "Abcdef", "mnopqr" ) );  
     printf( "%d\n", stricmp( "Mnopqr", "abcdef" ) );  
  }
  

produces the following:

  0  
  100  
  -100  
  -12  
  12