- 23 May 2023
-
DarkLight
-
PDF
toLocaleLowerCase
- Updated on 23 May 2023
-
DarkLight
-
PDF
toLocaleLowerCase Task Purpose
The toLocaleLowerCase task is used to convert a string value to lowercase 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 toLowerCase 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 uppercase format and you want to display it in lowercase. You could use the toLocaleLowerCase task to convert the entire dataset to lowercase characters.
Properties
Input and output parameters are shown below.
Incoming | Type | Description |
---|---|---|
str |
String | Required. The string to convert to lowercase. |
locale |
String | The locale to be used to convert to lowercase according to any locale-specific case mappings. |
Outgoing | Type | Description |
---|---|---|
lowercaseString |
String | A new string representing the incoming string converted to lowercase according to the current locale. |
Example
In this example the str
is given the Reference variable of "HELLO WORLD" in all CAPS (uppercase letters). The locale
would only be populated if it was a language such as Turkish, which needs specific letters to be capitalized for meaning.
The expected end result will be that all of the letters from the Reference variable are now lowercase and show up as "hello world".
Further Reading
For more information on using the locales parameter, see the Intl article on the MDN site.