MonobjcMonobjc Documented Class Library
CompareOptionsRangeLocale Method (aString, mask, range, locale)
NamespacesMonobjc.FoundationNSStringCompareOptionsRangeLocale(NSString, NSStringCompareOptions, NSRange, Id)

Returns an NSComparisonResult value that indicates the lexical ordering of a specified range within the receiver and a given string.

Original signature is '- (NSComparisonResult)compare:(NSString *)aString options:(NSStringCompareOptions)mask range:(NSRange)range locale:(id)locale'

Available in Mac OS X v10.0 and later.

Declaration Syntax
C#Visual BasicVisual C++
public virtual NSComparisonResult CompareOptionsRangeLocale(
	NSString aString,
	NSStringCompareOptions mask,
	NSRange range,
	Id locale
Public Overridable Function CompareOptionsRangeLocale ( _
	aString As NSString, _
	mask As NSStringCompareOptions, _
	range As NSRange, _
	locale As Id _
) As NSComparisonResult
virtual NSComparisonResult CompareOptionsRangeLocale(
	NSString^ aString, 
	NSStringCompareOptions mask, 
	NSRange range, 
	Id^ locale
aString (NSString)
The string with which to compare the range of the receiver specified by range.
mask (NSStringCompareOptions)
Options for the search—you can combine any of the following using a C bitwise OR operator: NSCaseInsensitiveSearch, NSLiteralSearch, NSNumericSearch.
range (NSRange)
The range of the receiver over which to perform the comparison. The range must not exceed the bounds of the receiver.
locale (Id)
An instance of NSLocale. If this value not nil and is not an instance of NSLocale, uses the current locale instead. If you are comparing strings to present to the end-user, you should typically pass the user’s locale (currentLocale [NSLocale]).
Return Value
NSOrderedAscending if the substring of the receiver given by range precedes aString in lexical ordering for the locale given in dict, NSOrderedSame if the substring of the receiver and aString are equivalent in lexical value, and NSOrderedDescending if the substring of the receiver follows aString.
Version Information
  • Available in Monobjc Bridge: 10.6 (For Mac OS X 10.6 and later), 10.5 (For Mac OS X 10.5 and later)

Assembly: Monobjc.Foundation (Module: Monobjc.Foundation)