共用方式為


NSString.Compare 方法

定義

多載

Compare(NSString)

語彙會比較這與指定的字串。

Compare(NSString, NSStringCompareOptions)
Compare(NSString, NSStringCompareOptions, NSRange)
Compare(NSString, NSStringCompareOptions, NSRange, NSLocale)

Compare(NSString)

語彙會比較這與指定的字串。

[Foundation.Export("compare:")]
public virtual Foundation.NSComparisonResult Compare (Foundation.NSString aString);
abstract member Compare : Foundation.NSString -> Foundation.NSComparisonResult
override this.Compare : Foundation.NSString -> Foundation.NSComparisonResult

參數

aString
NSString

要比較的字串。

傳回

屬性

適用於

Compare(NSString, NSStringCompareOptions)

[Foundation.Export("compare:options:")]
public virtual Foundation.NSComparisonResult Compare (Foundation.NSString aString, Foundation.NSStringCompareOptions mask);
abstract member Compare : Foundation.NSString * Foundation.NSStringCompareOptions -> Foundation.NSComparisonResult
override this.Compare : Foundation.NSString * Foundation.NSStringCompareOptions -> Foundation.NSComparisonResult

參數

aString
NSString

要比較的字串。

mask
NSStringCompareOptions

比較旗標。

傳回

屬性

適用於

Compare(NSString, NSStringCompareOptions, NSRange)

[Foundation.Export("compare:options:range:")]
public virtual Foundation.NSComparisonResult Compare (Foundation.NSString aString, Foundation.NSStringCompareOptions mask, Foundation.NSRange range);
abstract member Compare : Foundation.NSString * Foundation.NSStringCompareOptions * Foundation.NSRange -> Foundation.NSComparisonResult
override this.Compare : Foundation.NSString * Foundation.NSStringCompareOptions * Foundation.NSRange -> Foundation.NSComparisonResult

參數

aString
NSString

要比較的字串。

mask
NSStringCompareOptions

比較旗標。

range
NSRange

傳回

屬性

適用於

Compare(NSString, NSStringCompareOptions, NSRange, NSLocale)

[Foundation.Export("compare:options:range:locale:")]
public virtual Foundation.NSComparisonResult Compare (Foundation.NSString aString, Foundation.NSStringCompareOptions mask, Foundation.NSRange range, Foundation.NSLocale locale);
abstract member Compare : Foundation.NSString * Foundation.NSStringCompareOptions * Foundation.NSRange * Foundation.NSLocale -> Foundation.NSComparisonResult
override this.Compare : Foundation.NSString * Foundation.NSStringCompareOptions * Foundation.NSRange * Foundation.NSLocale -> Foundation.NSComparisonResult

參數

aString
NSString

要比較的字串。

mask
NSStringCompareOptions

比較旗標。

range
NSRange
locale
NSLocale

要用於比較的地區設定。

這個參數可以是 null

傳回

屬性

適用於