[IRCServices Coding] irc_stricmp()
Andrew Church
achurch at achurch.org
Sun Feb 3 16:29:39 PST 2002
>On Sun, 3 Feb 2002, Andrew Church wrote:
>
>> > I've been rather curious about IRCServices' irc_stricmp function. What
>> >does it do that the regular stricmp() doesn't, and could it be replaced
>> >safely with stricmp?
>>
>> (1) stricmp() is (potentially) locale-dependent, and could conceivably
>> behave incorrectly in certain locales.
>>
>> (2) RFC1459-compliant ircds treat [ and {, \ and |, ] and } as
>> pairwise equivalent; stricmp() doesn't.
>
>I'd also like to point out that many systems don't *have* stricmp
Well, they _do_ have strcasecmp() which is the same thing (and
actually POSIX, I think)--I just like "stricmp" because (1) it's shorter
and (2) "strcasecmp" sounds like "case-sensitive string compare" which is
wrong.
Out of curiosity, are there any systems that don't have either
function?
--Andrew Church
achurch at achurch.org
http://achurch.org/