Everything

toupper


Conversion from lower-case to upper-case (not converted if argument is not in lower-case)

[Classification]

Standard library

[Syntax]

#include <ctype.h>

int toupper(int c);

[Return value]

If islower is true with respect to c, returns a character that makes isupper true in response; otherwise, returns c.

[Description]

This function is a macro that converts lowercase characters into the corresponding uppercase characters and leaves the other characters unchanged.

This macro is defined only when c is an integer in the range of EOF to 255. A compiled subroutine can be used instead of the macro definition, which is invalidated by using "#undef toupper".

[Example]

#include    <ctype.h>
int c = 'a';
int func() {
        int i;
        i = toupper(c);         /*Converts lowercase character 'a' of c into uppercase
                                  character 'A'.*/
        return(i);
}