Home | Top | Free Ajax Editor | JavaScript Editor JavaScript EditorGet Advanced
JavaScript and Ajax Editor,
Validator and Debugger!

1st JavaScript Editor.


localeCompare Method

Returns a value indicating whether two strings are equivalent in the current locale.

stringVar.localeCompare( stringExp )

Arguments

stringVar Required. A String object or literal. stringExp Required. String to compare to stringVar .

Remarks

The localeCompare performs a locale-sensitive string comparison of the stringVar and the stringExp and returns -1, 0, or +1, depending on the sort order of the system default locale.

If stringVar sorts before stringExp , localeCompare returns –1; if stringVar sorts after stringExp , +1 is returned. A return value of zero means that the two strings are equivalent.

Home | Top | Free Ajax Editor | JavaScript Editor JavaScript EditorGet Advanced
JavaScript and Ajax Editor,
Validator and Debugger!

1st JavaScript Editor.