MonobjcMonobjc Documented Class Library
RangeOfString Method (aString)

Finds and returns the range of the first occurrence of a given string within the receiver.

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

Available in Mac OS X v10.0 and later.

Declaration Syntax
C#Visual BasicVisual C++
public virtual NSRange RangeOfString(
	NSString aString
Public Overridable Function RangeOfString ( _
	aString As NSString _
) As NSRange
virtual NSRange RangeOfString(
	NSString^ aString
aString (NSString)
The string to search for. This value must not be nil.
Return Value
An NSRange structure giving the location and length in the receiver of the first occurrence of aString. 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)