method String.localeCompare
Private
String.localeCompare(
that: string,
locales?: string | string[],
): number

Determines whether two strings are equivalent in the current or specified locale.

Parameters

that: string

String to compare to target string

optional
locales: string | string[]

A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. This parameter must conform to BCP 47 standards; see the Intl.Collator object for details.

optional
options: Intl.CollatorOptions

An object that contains one or more properties that specify comparison options. see the Intl.Collator object for details.

Return Type

number