2.1.10 [ECMA-262/5] Section, String.prototype.localeCompare (that)


The specification states:

 The actual return values are implementation-defined to permit implementers to encode additional information in the value, but the function is required to define a total ordering on all Strings and to return 0 when comparing Strings that are considered canonically equivalent by the Unicode standard.

IE9 Mode, IE10 Mode, IE11 Mode, and EdgeHTML Mode (All Versions)

The returned value is determined as follows:

  1. Call the Microsoft Windows CompareString system function, passing S, that, and the current locale information as arguments.

  2. Pass the value 0 as the dwCmpFlags argument.

  3. Return result (1).