MonobjcMonobjc Documented Class Library
RangeOfStringOptions Method (aString, mask)
NamespacesMonobjc.FoundationNSStringRangeOfStringOptions(NSString, NSStringCompareOptions)

Finds and returns the range of the first occurrence of a given string within the receiver, subject to given options.

Original signature is '- (NSRange)rangeOfString:(NSString *)aString options:(NSStringCompareOptions)mask'

Available in Mac OS X v10.0 and later.

Declaration Syntax
C#Visual BasicVisual C++
public virtual NSRange RangeOfStringOptions(
	NSString aString,
	NSStringCompareOptions mask
Public Overridable Function RangeOfStringOptions ( _
	aString As NSString, _
	mask As NSStringCompareOptions _
) As NSRange
virtual NSRange RangeOfStringOptions(
	NSString^ aString, 
	NSStringCompareOptions mask
aString (NSString)
The string to search for. This value must not be nil.
mask (NSStringCompareOptions)
A mask specifying search options. The following options may be specified by combining them with the C bitwise OR operator: NSCaseInsensitiveSearch, NSLiteralSearch, NSBackwardsSearch, NSAnchoredSearch. See String Programming Guide for details on these options.
Return Value
An NSRange structure giving the location and length in the receiver of the first occurrence of aString, modulo the options in mask. Returns {NSNotFound, 0} if aString is not found or is empty (@"").
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)