keil_examples/USBHostLite/UsbHost/Fat/usbhost_fat.c
/*
**************************************************************************************************************
*                                       CASE INSENSITIVE COMPARISION OF STRINGS
*
* Description: This function compares two strings case insensitively
*
* Arguments  : str1               Pointer to the first string
*              str2               Pointer to the second string
*
* Returns    : MATCH_FOUND        if both the strings are same
*              NATCH_NOT_FOUND    if both the strings are different
*
**************************************************************************************************************
*/


Arguments  : str1               Pointer to the first string
str2               Pointer to the second string

Returns    : MATCH_FOUND        if both the strings are same
NATCH_NOT_FOUND    if both the strings are different
Arguments : str1 Pointer to the first string str2 Pointer to the second string Returns : MATCH_FOUND if both the strings are same NATCH_NOT_FOUND if both the strings are different
int32_t  FAT_StrCaseCmp (uint8_t  *str1,
                            uint8_t  *str2)
{
    while (*str1 && *str2) {
        if (*str1 == *str2 || *str1 == (*str2 + 32) || *str1 == (*str2 - 32)) {
            str1++;
            str2++;
            continue;
        } else {
            return (MATCH_NOT_FOUND);
        }
    }
    if (*str1 == 0 && *str2 == 0) {
        return (MATCH_FOUND);
    } else {
        return (MATCH_NOT_FOUND);
    }
}
int32_t FAT_StrCaseCmp ( uint8_t * str1 , uint8_t * str2 ) { while ( * str1 && * str2 ) { if ( * str1 == * str2 || * str1 == ( * str2 + 32 ) || * str1 == ( * str2 - 32 ) ) { str1 ++ ; str2 ++ ; continue ; } else { return ( MATCH_NOT_FOUND ) ; } } if ( * str1 == 0 && * str2 == 0 ) { return ( MATCH_FOUND ) ; } else { return ( MATCH_NOT_FOUND ) ; } }
CASE INSENSITIVE COMPARISION OF STRINGS
Description: This function compares two strings case insensitively
CASE INSENSITIVE COMPARISION OF STRINGS Description : This function compares two strings case insensitively