ttoolloowweerr() -- ctype Function (libc)

Convert characters to lower case
#iinncclluuddee <ccttyyppee.hh>
iinntt ttoolloowweerr(_c) iinntt _c;

The function ttoolloowweerr() converts the  character _c to lower case.  It returns
_c converted  to lower case.  If  _c is not upper-case  character, that is, a
character for which iissuuppppeerr() returns true, ttoouuppppeerr() returns it unchanged.

_E_x_a_m_p_l_e
The following example demonstrates ttoolloowweerr() and ttoouuppppeerr(). It reverses the
case of every character in a text file.

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

main()
{
    FILE *fp;
    int ch;
    int filename[100];

    printf("Enter name of file to use: ");
    fflush(stdout);
    gets(filename);

    if ((fp = fopen(filename,"r")) != NULL) {
        while ((ch = fgetc(fp)) != EOF) {
            if (islower(ch))
                putchar(toupper(ch));
            else if (isupper(ch))
                putchar(tolower(ch));
            else
                putchar(ch);
        }
    } else
         printf("Cannot open %s.\n", filename);
}

_S_e_e _A_l_s_o
_ttoolloowweerr(), lliibbcc, ttoouuppppeerr()
ANSI Standard, section 7.3.2.1
POSIX Standard, section 8.1
