[net.lang.c] tolower/toupper

san@ut-sally.UUCP (Steve Sanderson) (12/05/83)

On some implementations, tolower/toupper returns a non-alphabetic
character if their argument is already lower/upper.
I have heard differing opinions that:

	1) the case of the letter should be checked before using
	to????? to change to the opposite case.
or
	2) that the case should be checked within to?????, and nothing
	done if already in the proper case.

Granted that it makes little difference, both ways are easily accepted,
but... has any consensus been reached as to which is ``more standard''?
I prefer #2 simply because it puts more work someplace else.
I've run across this issue countless time when porting code,
If you aren't checking case, and neither are the to????? routines,
you end up with some surprises!


	Steve Sanderson

	ut-sally!san
	san@ut-sally.UUCP