StringPrototype.localeCompare(Object, Object) 方法

定義

比較指定兩個字串,並回傳一個整數,表示它們之間的詞彙關係。

此 API 支援此產品基礎結構,但無法直接用於程式碼之中。

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

參數

thisob
Object

這個方法作用的對象。

thatob
Object

要比較的 thisob字串。

傳回

thisob 小於 時 thatob為負值;當 thisobthatob於 時為零;當 thisob 大於 thatob時為正值。

屬性

適用於

另請參閱