int strncasecmp()

in TAs/optee_ta/AuthVars/src/wolf/RuntimeSupport.c [52:64]


int strncasecmp(const char *str1, const char *str2, size_t n)
{
    size_t i = 0;
    for(i = 0; i < n && str1[i] && str2[i]; i++)
    {
        char delta = tolower(str1[i]) - tolower(str2[i]);
        if (delta != 0)
        {
            return delta;
        }
    }
    return 0;
}