StringPrototype.localeCompare(Object, Object) Metódus

Definíció

Összehasonlítja a két megadott sztringet, és egy egész számot ad vissza, amely a közöttük lévő lexikális kapcsolatot jelzi.

Ez az API a termékinfrastruktúrát támogatja, és közvetlenül a kódból nem használható.

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

Paraméterek

thisob
Object

A metódus által alkalmazott objektum.

thatob
Object

A összehasonlítandó sztring thisob.

Válaszok

Negatív érték, ha thisob kisebb, mint thatob; nulla, ha thisob egyenlő thatob; pozitív érték, ha thisob nagyobb, mint thatob.

Attribútumok

A következőre érvényes:

Lásd még