httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yann Ylavic <ylavic....@gmail.com>
Subject Re: Better ap_casecmpstr[n]?
Date Tue, 24 Nov 2015 18:43:10 GMT
On Tue, Nov 24, 2015 at 7:39 PM, Mikhail T. <mi+thun@aldan.algebra.com> wrote:
> On 24.11.2015 13:04, Yann Ylavic wrote:
>
> int ap_casecmpstr_2(const char *s1, const char *s2)
> {
>     size_t i;
>     const unsigned char *ps1 = (const unsigned char *) s1;
>     const unsigned char *ps2 = (const unsigned char *) s2;
>
>     for (i = 0; ; ++i) {
>         const int c1 = ps1[i];
>         const int c2 = ps2[i];
>
>         if (c1 != c2) {
>             return c1 - c2;
>         }
>         if (!c1) {
>             break;
>         }
>     }
>     return (0);
> }
>
> Sorry, but would not the above declare "A" and "a" to be different?

Yeah, forgot the translation, I went too fast :)

Mime
View raw message