StringPrototype.localeCompare(Object, Object) Metod

Definition

Jämför de två angivna strängarna och returnerar ett heltal som anger den lexikala relationen mellan dem.

Detta API stöder produktinfrastrukturen och är inte avsett att användas direkt från koden.

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

Parametrar

thisob
Object

Det objekt som den här metoden agerar på.

thatob
Object

Strängen som ska jämföras med thisob.

Returer

Ett negativt värde när thisob är mindre än thatob; noll när thisob det thatobär lika med ; ett positivt värde när thisob är större än thatob.

Attribut

Gäller för

Se även