toLocaleUpperCase

The toLocaleUpperCase task converts 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 functions identically to toUpperCase and produces the same output; however, certain languages may behave differently — for example, Turkish has case mappings that differ from the default Unicode case mappings.

Potential use case

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

Properties

IncomingTypeDescription
strStringRequired. The string to convert to uppercase.
localeStringThe locale to use for uppercase conversion, for languages with locale-specific case mappings.
OutgoingTypeDescription
uppercaseStringStringA new string representing the input string converted to uppercase according to the current locale.

Example

In this example, str is given the reference variable "hello world" in lowercase letters. The locale variable is only populated for languages such as Turkish, which require specific letter capitalizations for meaning.

toLocaleUpperCase task with str set to hello world and no locale specified

The outgoing result shows all letters converted to uppercase: "HELLO WORLD".

Outgoing result showing HELLO WORLD in uppercase

For more information, see the Locale article on MDN.