Bewerken

Delen via


StringPrototype.localeCompare(Object, Object) Method

Definition

Compares the two specified strings and returns an integer that indicates the lexical relationship between them.

This API supports the product infrastructure and is not intended to be used directly from your code.

public:
 static int localeCompare(System::Object ^ thisob, System::Object ^ thatob);
[Microsoft.JScript.JSFunction(Microsoft.JScript.JSFunctionAttributeEnum.HasThisObject, Microsoft.JScript.JSBuiltin.String_localeCompare)]
public static int localeCompare (object thisob, object thatob);
[<Microsoft.JScript.JSFunction(Microsoft.JScript.JSFunctionAttributeEnum.HasThisObject, Microsoft.JScript.JSBuiltin.String_localeCompare)>]
static member localeCompare : obj * obj -> int
Public Shared Function localeCompare (thisob As Object, thatob As Object) As Integer

Parameters

thisob
Object

The object that this method is acting upon.

thatob
Object

The string to compare to thisob.

Returns

A negative value when thisob is less than thatob; zero when thisob equals thatob; a positive value when thisob is greater than thatob.

Attributes

Applies to

See also