Why
do some versions of
toupper act strangely if given an upper-case letter?
Why does some code call islower before toupper?
Older versions of toupper and tolower did not always work correctly on arguments which did not need converting (i.e. on digits or punctuation or letters already of the desired case). In ANSI/ISO Standard C, these functions are guaranteed to work appropriately on all character arguments.
References:
ANSI Sec. 4.3.2
ISO Sec. 7.3.2
H&S Sec. 12.9 pp. 320-1
PCS p. 182
Read sequentially: prev next up top
This page by Steve Summit // Copyright 1995 // mail feedback