StringPrototype.localeCompare(Object, Object) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
比較指定兩個字串,並回傳一個整數,表示它們之間的詞彙關係。
此 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為負值;當 thisob 等 thatob於 時為零;當 thisob 大於 thatob時為正值。
- 屬性