Toupper

toupper converts the lower case letters in a string into upper case letters. Other characters remain unchanged.

Syntax

 toupper(STRING_EXPR)

Examples

 # Let's convert lowercase to uppercaseIRRITATED_MESSAGE=toupper("please be quiet!") : # Returns "PLEASE BE QUIET!"# Let's compare strings independently from the caseIf toupper(NAME_1) = toupper(NAME_2)# The two names are identicalEndif# Let's compare strings independently from the case and the accentsIf toupper(ctrans(NAME_1)) = toupper(ctrans(NAME_2))# The two names are identicalEndif# Let's do it with a (French) accentuated messageIRRITATED_MESSAGE=toupper("s'il vous plaît, arrêtez ce bruit ô combien insensé")# returns "S'IL VOUS PLAÎT, ARRÊTEZ CE BRUIT Ô COMBIEN INSENSÉ"

Description

toupper converts the lower case characters (including the accentuated letters) in the corresponding upper case characters, without changing other characters.

The function ctrans can be used to suppress the accents prior to using the toupper function.

The type of result is Char or Clbfile, depending on the length of the string.

Comments

The format$ used with a format that contains only "A", will also perform a toupper conversion, with the following differences:
* The length of the resulting string will be constant and can include trailing spaces.
* If characters that are not letters are present, the formatting will globally replace the string by a string filled with spaces. This will happen for accentuated characters that are refused by the "A" format.

Associated errors

Error codeDescription
10The argument is not a string or CLOB.

See also

tolower, format$, ctrans.