stricmp
Compares, with case insensitivity, two strings
#include <string.h> int stricmp ( const char *s1, const char *s2);
The stricmp 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.
The stricmp function compares, with case insensitivity, the string pointed to by s1 to the string pointed to by s2.
#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", "nopqr") ); printf ("%d\n", stricmp ("Mnopqr", "abcdef") ); }
produces the following:
0 100 -100 -12 12