ngx_strcasecmp

来源:互联网 发布:ipad淘宝怎么清除缓存 编辑:程序博客网 时间:2024/06/06 03:08
ngx_strcasecmp(u_char *s1, u_char *s2)
{
    ngx_uint_t  c1, c2;


    for ( ;; ) {
        c1 = (ngx_uint_t) *s1++;
        c2 = (ngx_uint_t) *s2++;


        c1 = (c1 >= 'A' && c1 <= 'Z') ? (c1 | 0x20) : c1;
        c2 = (c2 >= 'A' && c2 <= 'Z') ? (c2 | 0x20) : c2;


        if (c1 == c2) {


            if (c1) {
                continue;
            }


            return 0;
        }


        return c1 - c2;
    }
}
原创粉丝点击