Szerkesztés

Megosztás a következőn keresztül:


NSString.Compare Method

Definition

Overloads

Compare(NSString)

Lexically compares this to the specified string.

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

Compare(NSString)

Lexically compares this to the specified string.

[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

Parameters

aString
NSString

The string to compare to.

Returns

Attributes

Applies to

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

Parameters

aString
NSString

The string to compare to.

mask
NSStringCompareOptions

Comparison flags.

Returns

Attributes

Applies to

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

Parameters

aString
NSString

The string to compare to.

mask
NSStringCompareOptions

Comparison flags.

range
NSRange

Returns

Attributes

Applies to

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

Parameters

aString
NSString

The string to compare to.

mask
NSStringCompareOptions

Comparison flags.

range
NSRange
locale
NSLocale

Locale to use for the comparison.

This parameter can be null.

Returns

Attributes

Applies to