Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Watcom C Library Reference - <u>synopsis:</u> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Synopsis:
    #include <ctype.h>
    int toupper( int c );
    int _toupper( int c );
    #include <wchar.h>
    wint_t towupper( wint_t c );

Description:
    The toupper function converts c to a uppercase letter if c represents a
    lowercase letter.

    The _toupper function is a version of toupper to be used only when c is
    known to be lowercase.

    The towupper function is similar to toupper except that it accepts a
    wide-character argument.

Returns:
    The toupper function returns the corresponding uppercase letter when the
    argument is a lowercase letter; otherwise, the original character is
    returned.  The towupper function returns the corresponding
    wide-character uppercase letter when the argument is a wide-character
    lowercase letter; otherwise, the original wide character is returned.

    The result of _toupper is undefined if c is not a lowercase letter.

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

    char chars[] = {
        'a',
        '5',
        '$',
        'z'
    };

    #define SIZE sizeof( chars ) / sizeof( char )

    void main()
      {
        int   i;

        for( i = 0; i < SIZE; i++ ) {
            printf( "%c ", toupper( chars[ i ] ) );
        }
        printf( "\n" );
      }

    produces the following:

    A 5 $ Z

Classification:
    toupper is ANSI, _toupper is not ANSI, towupper is ANSI

Systems:
     toupper - All, Netware

    _toupper - All, Netware
    towupper - All, Netware

See Also:
    isalnum, isalpha, iscntrl, isdigit, isgraph, islower, isprint, ispunct,
    isspace, isupper, iswctype, isxdigit, strlwr, strupr, tolower

See Also: iswctype

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson