Share via


StringPrototype.localeCompare(Object, Object) Methode

Definition

Vergleicht die beiden angegebenen Zeichenfolgen und gibt eine ganze Zahl zurück, die die lexikalische Beziehung zwischen diesen angibt.

Diese API unterstützt die Produktinfrastruktur und ist nicht für die direkte Verwendung aus Ihrem Code gedacht.

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

Parameter

thisob
Object

Das Objekt, für den diese Methode ausgeführt wird.

thatob
Object

Das mit thisob zu vergleichende Zeichenfolge.

Gibt zurück

Ein negativer Wert, wenn thisob kleiner als thatob ist, 0 (null), wenn thisob gleich thatob ist, ein positiver Wert, wenn thisob größer als thatob ist.

Attribute

Gilt für:

Weitere Informationen