StringPrototype.localeCompare(Object, Object) Metode

Definisi

Membandingkan dua string yang ditentukan dan mengembalikan bilangan bulat yang menunjukkan hubungan leksikal di antara mereka.

API ini mendukung infrastruktur produk dan tidak dimaksudkan untuk digunakan langsung dari kode Anda.

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

Objek yang ditindakkan oleh metode ini.

thatob
Object

String untuk dibandingkan dengan thisob.

Mengembalikan

Nilai negatif ketika kurang dari thisob; nol jika thatob sama thisobdengan ; nilai positif ketika thatob lebih besar dari thisob.thatob

Atribut

Berlaku untuk

Lihat juga