JavaScript toLocaleLowerCase() Method
Example
Converts a string to lowercase:
var
str
=
"
Runoob
"
;
var
res
=
str
.
toLocaleLowerCase
(
)
;
res Output result:
runoob
Try it »
Definition and Usage
The toLocaleLowerCase() method converts a string to lowercase according to the locale of the host environment.
The locale is determined by the browser's language settings.
Usually, this method returns the same result as toLowerCase() the method, except that a few languages (such as Turkish) have locale-specific case mappings.
Note: The toLocaleLowerCase() method does not change the original string.
Tip: Use toLocaleUpperCase() The method converts a string to uppercase according to the host environment's locale.
Browser support
The numbers in the table indicate the first browser version that supports this property.
| Method | |||||
|---|---|---|---|---|---|
| toLocaleLowerCase() | Yes | Yes | Yes | Yes | Yes |
Syntax
string.toLocaleLowerCase()
Parameter value
none.
Return Value
| Type | Description |
|---|---|
| String |
Converts to lowercase according to the local language. |
Technical Details
| JavaScript version: | ECMAScript 1 |
|---|
JavaScript String object