ASCII_TO_UPPER() / ASCII_ToUpper()
Converts a lowercase alphabetic character to its corresponding uppercase alphabetic character.
Files
lib_ascii.h/lib_ascii.c
Prototypes
ASCII_TO_UPPER(ch); CPU_CHAR ASCII_ToUpper (CPU_CHAR ch);
Arguments
ch
Character to examine.
Returned Value
Uppercase equivalent of c
, if character c
is an lowercase character;
Character c
, otherwise.
Required Configuration
None.
Notes / Warnings
ISO/IEC 9899:TC2, Section 7.4.2.2.(2) states that “toupper()
... converts a lowercase letter to a corresponding uppercase letter”. ISO/IEC 9899:TC2, Section 7.4.2.2.(3) states that “if the argument is a character for which islower()
is true and there are one or more corresponding characters ... for which isupper()
is true, ... toupper()
... returns one of the corresponding characters; ... otherwise, the argument is returned unchanged”.
Example Usage
CPU_CHAR ch; CPU_CHAR c_upper; ch = ASCII_CHAR_LATIN_LOWER_G; c_upper = ASCII_TO_UPPER(ch);