toupper()

Convert text to all uppercase characters.

Syntax

toupper(text)

Parameter

Parameter

Definition

text

text that is to be returned as uppercase letters The text can be a text string enclosed in double quotation marks, or one or more PSL commands that produce text as output.

Description

The toupper() function returns a copy of text with all lowercase letters converted to uppercase letters.

Example

The following is an example of the toupper() function:

function main() {
teststr = "SOME ARE UPPER, some are lower, SoMe ArE mIxEd";
printf(" original : %s\n",teststr);
printf("all upper : %s\n",toupper(teststr));
}

 

The example produces the following output:

original : SOME ARE UPPER, some are lower, SoMe ArE mIxEd
all upper : SOME ARE UPPER, SOME ARE LOWER, SOME ARE MIXED


Was this page helpful? Yes No Submitting... Thank you

Comments