[Gllug] Re: [OxLUG] C function strcasecmp

SteveC steve at fractalus.com
Fri Jul 20 10:11:30 UTC 2001


On Fri, 20 Jul 2001, Alain Williams wrote:
> OK: Linux has it, BSD 4.4 has it (the manual says), but how portable is it ?
> Sun, HP, AIX I suppose are the most important.

[insert C newbie disclaimer]

SunOS somemachne.somewhere 5.6 Generic_105181-20 sun4u sparc 
SUNW,Ultra-Enterprise

has it... but looking in my copy of the c programming language strcmp is
like 3 lines of code, you could just modify the s[i]==t[i] test to take
account of the ascii 65 to ascii 97 gap?

s[i]==t[i] || s[i]-32==t[i] || s[i]+32==t[i]

would be a (very broken) example?

I don't see it here so I assume its not ANSI...

have fun,

SteveC steve at fractalus.com fractalus.com/steve stevecoast at hushmail.com


-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list