toLocaleUpperCase
  • 23 May 2023
  • Dark
    Light
  • PDF

toLocaleUpperCase

  • Dark
    Light
  • PDF

Article summary

toLocaleUpperCase Task Purpose

The toLocaleUpperCase task is used to convert a string value to uppercase according to locale-specific case mappings. The locale is based on the language settings of the browser. For most languages this task will function exactly like the toUpperCase task and produce the same output; however, certain languages may behave differently (e.g. case mappings for Turkish do not follow the default case mappings in Unicode).

Potential Use Case

Suppose you have a dataset in lowercase format and you want to display it in uppercase. You could use the toLocaleUpperCase task to convert the entire dataset to uppercase characters.

Properties

Input and output parameters are shown below.

Incoming Type Description
str String Required. The string to convert to uppercase.
locale String The locale to be used to convert to uppercase according to any locale-specific case mappings.


Outgoing Type Description
uppercaseString String A new string representing the value of the incoming string converted to uppercase according to the current locale.

Example

In this example the str is given the Reference variable of "hello world" in lowercase letters. The locale variable would be populated only if it was a language such as Turkish, which needs specific letters to be capitalized for meaning.

toLocaleUppercase-01

The outgoing result shows that all of the letters from the incoming Reference variable are now uppercase and display as "HELLO WORLD".

toLocaleUppercase-02

Further Reading

For more information see the Locale article on the MDN site.


Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.