C Language and Libraries Help (clang.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
Case Conversion Routines
 Summary Example                         Up Contents Index Back
─────Run-Time Library───────────────────────────────────────────────────────
 
     The __toascii, tolower, _tolower, toupper, and _toupper macros
     convert a single character as specified.
 
     The __toascii routine sets all but the low-order 7 bits of <c> to
     0, so that the converted value represents a character in the ASCII
     character set. If <c> already represents an ASCII character, <c>
     is unchanged.
 
     The tolower routine converts <c> to lowercase if <c> represents an
     uppercase letter. Otherwise, <c> is unchanged.
 
     The _tolower routine is a version of tolower to be used only when
     <c> is known to be uppercase. The result of _tolower is undefined
     if <c> is not an uppercase letter.
 
     The toupper routine converts <c> to uppercase if <c> represents a
     lowercase letter. Otherwise, <c> is unchanged.
 
     The _toupper routine is a version of toupper to be used only when
     <c> is known to be lowercase. The result of _toupper is undefined
     if <c> is not a lowercase letter.
 
     Note that these routines are implemented both as functions and
     as macros. To conform to the ANSI standard, the tolower and
     toupper routines are also implemented as functions. The function
     versions can be used by removing the macro definitions through
     #undef directives or by not including the CTYPE.H header file.
     Function declarations of toupper and tolower are given in
     STDLIB.H.
 
     If the /Za compile option is used, the macro form of toupper or
     tolower is not used because it evaluates its arguments more than
     once. Because of this, arguments with side effects would produce
     potentially bad results.
 
     Return Value
 
     These routines return the converted character <c>. There is no
     error return.
                                    -♦-