myString.localeCompare( compareString ) in ECMAScript 262
Compare the string to the argument in the current locale.
Arguments
name | type | description |
---|---|---|
compareString | String | The string to compare to the c |
- Return Type
- Number
Description
This return value of this function depends on the specific implementation. From the specification:
"The result is intended to order strings in the sort order specified by the system default locale, and will be negative, zero, or positive, depending on whether [the calling string] comes before [compareString
] in the sort order, the strings are equal, or [the calling string] comes [compareString
] that in the sort order, respectively."