In a nutshell
The toUpperCase() function takes a string as an argument and returns the same string with all letters converted to upper case. The return type is Text. It is useful in test scripts where text values need to be normalized to upper case before comparison or assertion.
Overview
The toUpperCase() function takes a string as an argument. It returns the string with all letters in upper case.
Return Type
Syntax
- <variable> = <string>.toUpperCase();
(OR)
- <variable> = toUpperCase( <string> );
(OR)
- <variable> = <string>.upper();
(OR)
- <variable> = upper( <string> );
| Parameter | Description | Data type |
|---|
| <variable> | Variable which will contain the returned string. | TEXT |
| <string> | All letters in this string will be converted to upper case. | TEXT |
Examples
- mainString = "Create online database applications";
- newText = upper(mainString); // returns "CREATE ONLINE DATABASE APPLICATIONS"