toupper -- a lesson for programmers

Martin Minow minow at decvax.UUCP
Sat Nov 12 09:29:53 AEST 1983


The behavior of toupper() and tolower() varies across the many
implementations of the C library.  The following strategies
are known to work:

1.	if (isupper(c))
	    c = tolower(c);

2.	#ifdef	tolower
	#undef	tolower
	#define	tolower(c) (whatever you feel is right)

Moral: if you do something wrong, half the people will adapt
to it and the other half will "do it right."

Martin Minow
decvax!minow



More information about the Comp.lang.c mailing list