### tolower - toupper -- Convert Character Case

Format

>     #include <ctype.h>
>     int tolower(int C);
>     int toupper(int c);

Language Level: ANSI, POSIX, XPG4
tolower converts the uppercase letter C to the corresponding lowercase letter.

toupper converts the lowercase letter c to the corresponding uppercase letter.

The character mapping is determined by the LC_CTYPE category of the current locale.

Return Value
Both functions return the converted character. If the character c does not have a corresponding lowercase of uppercase character, the functions return c unchanged.

Example
This example uses toupper and tolower to modify characters between code 0 and code 7f.

    #include <stdio.h>
    #include <ctype.h>

    int main(void)
    {
       int ch;

       for (ch = 0; ch <= 0x7f; ch++)
       {
          printf("toupper=%#04x\n", toupper(ch));
          printf("tolower=%#04x\n", tolower(ch));
          putchar('\n');
          }
            return 0;
    }

isalnum to isxdigit -- Test Integer Value
isascii -- Test Integer Values
_iscsym - _iscsymf -- Test Integer
_toascii - _tolower - _toupper -- Convert Character
towlower - towupper -- Convert Wide Character Case
<ctype.h>