Why is tolower behave different???

Warren Tucker wht at n4hgf.Mt-Park.GA.US
Tue Jul 24 06:29:38 AEST 1990


>>>Finally, it dawned on me that the function call tolower was to blame.
>>>On the VAX, the call did nothing if the char was already lowercase, while
>>>the Sun converted it anyway.

System 5-derived tolower() absolutely coverts, while BSD 
does the equivalent
   if isupper(ch) convert

ANSI aside, I'll always code
   if(isupper(ch))
		ch = tolower(ch);
to be safe.
 
----------------------------------------------------------------------
Warren Tucker, TuckerWare   emory!n4hgf!wht or wht at n4hgf.Mt-Park.GA.US
"It was electrons that brought down the Berlin Wall." -- Timothy Leary



More information about the Comp.lang.c mailing list