MonobjcMonobjc Documented Class Library
URLAtIndexEffectiveRange Method (__target, location, effectiveRange)
NamespacesMonobjc.AppKitNSAttributedString_AppKitAdditionsURLAtIndexEffectiveRange(NSAttributedString, NSUInteger, NSRange%)

Returns a URL, either from a link attribute or from text at the given location that appears to be a URL string, for use in automatic link detection.

Original signature is '- (NSURL *)URLAtIndex:(NSUInteger)location effectiveRange:(NSRangePointer)effectiveRange'

Available in Mac OS X v10.5 and later.

Declaration Syntax
C#Visual BasicVisual C++
public static NSURL URLAtIndexEffectiveRange(
	this NSAttributedString __target,
	NSUInteger location,
	ref NSRange effectiveRange
<ExtensionAttribute> _
Public Shared Function URLAtIndexEffectiveRange ( _
	__target As NSAttributedString, _
	location As NSUInteger, _
	ByRef effectiveRange As NSRange _
static NSURL^ URLAtIndexEffectiveRange(
	NSAttributedString^ __target, 
	NSUInteger location, 
	NSRange% effectiveRange
__target (NSAttributedString)
The target instance.
location (NSUInteger)
The character index in the string at which the method checks for a link.
effectiveRange (NSRange%)
The actual range covered by the link attribute or URL string, or of non-URL text if no apparent URL is found.
Return Value
The URL found at location.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type NSAttributedString. When you use instance method syntax to call this method, omit the first parameter.
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.AppKit (Module: Monobjc.AppKit)