C/C++ Example Procedure: strcmpi, stricmp - Compare two ASCII c-strings, ignore case

See related: C/C++ Examples

#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);
}

Cookies are simple text files stored on the user's computer. They are used for adding features and security to this site.
OK