PROWAREtech
C/C++: strcmpi Procedure (stricmp)
Compare two ASCII c-strings, ignore case.
#define stricmp strcmpi
int strcmpi( char * dst, char * src )
{
int f, l;
do {
f = *dst;
if ( (f >= 'A') && (f <= 'Z') )
f = f + ('a' - 'A');
l = *src;
if ( (l >= 'A') && (l <= 'Z') )
l = l + ('a' - 'A');
dst++;
src++;
} while (f && f == l);
return(f - l);
}
Comment