localeCompare

The localeCompare method compares two strings in the browser's locale.

 

Syntax

System.Int32 localeCompare(System.String compareString);

 

Parameters

compareString

String to compare with.

 

Return Value

Returns -1 if the reference string is sorted before the compareString, 0 if the two string are equals. And 1 if the reference string is sorted after the compareString.

 

Remarks

Member of string.

 

Example