Back

str.toLocaleUpperCase()

str.toLocaleUpperCase()

The toLocaleUpperCase() method returns the calling string value converted to upper case, according to any locale-specific case mappings.

Syntax

str.toLocaleUpperCase()

Description

The toLocaleUpperCase() method returns the value of the string converted to upper case according to any locale-specific case mappings. toLocaleUpperCase() does not affect the value of the string itself. In most cases, this will produce the same result as toUpperCase(), 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.

Examples

Using toLocaleUpperCase()

console.log('alphabet'.toLocaleUpperCase()); // 'ALPHABET'

  Created by Mozilla Contributors, license: CC-BY-SA 2.5