
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Watcom C Library Reference - <u>synopsis:</u>
[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Synopsis:
#include <string.h>
int strcmpi( const char *s1, const char *s2 );
int wcscmpi( const wchar_t *s1, const wchar_t *s2 );
Description:
The strcmpi function compares, with case insensitivity, the string
pointed to by s1 to the string pointed to by s2. All uppercase
characters from s1 and s2 are mapped to lowercase for the purposes of
doing the comparison. The strcmpi function is identical to the stricmp
function.
The wcscmpi function is a wide-character version of strcmpi that
operates with wide-character strings.
Returns:
The strcmpi function returns an integer less than, equal to, or greater
than zero, indicating that the string pointed to by s1 is less than,
equal to, or greater than the string pointed to by s2.
Example:
#include <stdio.h>
#include <string.h>
void main()
{
printf( "%d\n", strcmpi( "AbCDEF", "abcdef" ) );
printf( "%d\n", strcmpi( "abcdef", "ABC" ) );
printf( "%d\n", strcmpi( "abc", "ABCdef" ) );
printf( "%d\n", strcmpi( "Abcdef", "mnopqr" ) );
printf( "%d\n", strcmpi( "Mnopqr", "abcdef" ) );
}
produces the following:
0
100
-100
-12
12
Classification:
WATCOM
Systems:
strcmpi - All, Netware
wcscmpi - All
See Also:
strcmp, stricmp, strncmp, strnicmp
See Also:
Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson