VBScript UCase Function

Definition and Usage

The UCase function can convert the specified string to uppercase.

Tip:See also LCase function.

Syntax

UCase(string)
Parameter Description
string Required. Must be converted to an uppercase string.

Example

Example 1

dim txt
txt="This is a beautiful day!"
document.write(UCase(txt))

Output:

THIS IS A BEAUTIFUL DAY!

Example 2

dim txt
txt="This Is a Beautiful Day!"
document.write(UCase(txt))

Output:

THIS IS A BEAUTIFUL DAY!