toLocaleLowerCase()
method returns the calling string value converted to lower case, according to any locale-specific case mappings.
The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
str.toLocaleLowerCase() str.toLocaleLowerCase(locale) str.toLocaleLowerCase([locale, locale, ...])
locale
可选
locale
parameter indicates the locale to be used to convert to lower case according to any locale-specific case mappings. If multiple locales are given in an
Array
,
best available locale
is used. The default locale is the host environment’s current locale.
A new string representing the calling string converted to lower case, according to any locale-specific case mappings.
RangeError
("invalid language tag: xx_yy") is thrown if a
locale
argument isn't a valid language tag.
TypeError
("invalid element in locales argument") is thrown if an array element isn't of type string.
toLocaleLowerCase()
method returns the value of the string converted to lower case according to any locale-specific case mappings.
toLocaleLowerCase()
does not affect the value of the string itself. In most cases, this will produce the same result as
toLowerCase()
, but for some locales, such as Turkish, whose case mappings do not follow the default case mappings in Unicode, there may be a different result.
toLocaleLowerCase()
'ALPHABET'.toLocaleLowerCase(); // 'alphabet'
'\u0130'.toLocaleLowerCase('tr') === 'i'; // true
'\u0130'.toLocaleLowerCase('en-US') === 'i'; // false
let locales = ['tr', 'TR', 'tr-TR', 'tr-u-co-search', 'tr-x-turkish'];
'\u0130'.toLocaleLowerCase(locales) === 'i'; // true
The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
更新 GitHub 上的兼容性数据| Desktop | Mobile | Server | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
toLocaleLowerCase
|
Chrome 1 | Edge 12 | Firefox 1 | IE 5.5 | Opera 4 | Safari 1.3 | WebView Android 1 | Chrome Android 18 | Firefox Android 4 | Opera Android 10.1 | Safari iOS 1 | Samsung Internet Android 1.0 | nodejs 0.1.100 |
locale
|
Chrome 58 | Edge 12 | Firefox 55 | IE 6 | Opera 45 | Safari 10 | WebView Android 58 | Chrome Android 58 | Firefox Android 55 | Opera Android 43 | Safari iOS 10 | Samsung Internet Android 7.0 |
nodejs
13.0.0
|
完整支持
见实现注意事项。
String
String.fromCharCode()
String.fromCodePoint()
String.prototype.anchor()
String.prototype.big()
String.prototype.blink()
String.prototype.bold()
String.prototype.charAt()
String.prototype.charCodeAt()
String.prototype.codePointAt()
String.prototype.concat()
String.prototype.endsWith()
String.prototype.fixed()
String.prototype.fontcolor()
String.prototype.fontsize()
String.prototype.includes()
String.prototype.indexOf()
String.prototype.italics()
String.prototype.lastIndexOf()
String.prototype.link()
String.prototype.localeCompare()
String.prototype.match()
String.prototype.matchAll()
String.prototype.normalize()
String.prototype.padEnd()
String.prototype.padStart()
String.prototype.repeat()
String.prototype.replace()
String.prototype.replaceAll()
String.prototype.search()
String.prototype.slice()
String.prototype.small()
String.prototype.split()
String.prototype.startsWith()
String.prototype.strike()
String.prototype.sub()
String.prototype.substr()
String.prototype.substring()
String.prototype.sup()
String.prototype.toLocaleLowerCase()
String.prototype.toLocaleUpperCase()
String.prototype.toLowerCase()
String.prototype.toSource()
String.prototype.toString()
String.prototype.toUpperCase()
String.prototype.trim()
String.prototype.trimEnd()
String.prototype.trimStart()
String.prototype.valueOf()
String.prototype[@@iterator]()
String.raw()
Function
Object
Object.prototype.__defineGetter__()
Object.prototype.__defineSetter__()
Object.prototype.__lookupGetter__()
Object.prototype.__lookupSetter__()
Object.prototype.hasOwnProperty()
Object.prototype.isPrototypeOf()
Object.prototype.propertyIsEnumerable()
Object.prototype.toLocaleString()
Object.prototype.toSource()
Object.prototype.toString()
Object.prototype.valueOf()
Object.setPrototypeOf()