JavaScript toLocaleUpperCase()Method
Example
Convert the string to uppercase:
var str = "Example";
var res = str.toLocaleUpperCase();
nOutput:
EXAMPLE
Try it Yourself »
Definition and Usage
The toLocaleUpperCase() method converts a string to uppercase according to the locale of the local host.
The locale is determined by the browser's language settings.
Usually, this method and thetoUpperCase()method return the same result; only a few languages (such as Turkish) have locale-specific case mappings.
Note:The toLocaleUpperCase() method does not change the original string.
Tip:Use thetoLocaleLowerCase()method to convert the string to lowercase according to the local host's language.
Browser Support
The numbers in the table indicate the first browser version number that supports this property.
| Method | |||||
|---|---|---|---|---|---|
| toLocaleLowerCase() | Yes | Yes | Yes | Yes | Yes |
Syntax
string.toLocaleUpperCase()
Parameter Values
None.Return Value
| Type | Description |
|---|---|
| String | Converted to uppercase according to the local language. |
Technical Details
| JavaScript Version: | ECMAScript 1 |
|---|
Other Extensions
JavaScript String Object