At first glance this seems to meet the POSIX definition in the POSIX context. Just want to be careful about using this for non-posix applications and your doxygen seems to cover this. Looks good to me. Implemented in r1715401
If people want to nit-pick about naming and wish to rename it to something else, be my guest. > On Nov 20, 2015, at 1:03 PM, Yann Ylavic <ylavic....@gmail.com> wrote: > > +1 > > On Fri, Nov 20, 2015 at 6:17 PM, Jim Jagielski <j...@jagunet.com> wrote: >> We use str[n]casecmp quite a bit. The rub is that some >> platforms use a sensible implementation (such as OSX) which >> uses a upper-lowercase map and is v. fast, and others >> use a brain-dead version which does an actual tolower() of >> each char in the string as it tests. We actually try to >> handle this in many cases by doing a switch/case test on the >> 1st char to fast path the strncasecmp, resulting in ugly code. >> >> This is crazy. >> >> I propose a ap_strncasecmp/ap_strcasecmp which we should use. >> Ideally, it would be in apr but no need to wait for that >> to happen :) >> >> Unless people have heartburn about this, I will add next week.