MonobjcMonobjc Documented Class Library
StringByReplacingOccurrencesOfStringWithStringOptionsRange Method (target, replacement, options, searchRange)
NamespacesMonobjc.FoundationNSStringStringByReplacingOccurrencesOfStringWithStringOptionsRange(NSString, NSString, NSStringCompareOptions, NSRange)

Returns a new string in which all occurrences of a target string in a specified range of the receiver are replaced by another given string.

Original signature is '- (NSString *)stringByReplacingOccurrencesOfString:(NSString *)target withString:(NSString *)replacement options:(NSStringCompareOptions)options range:(NSRange)searchRange'

Available in Mac OS X v10.5 and later.

Declaration Syntax
C#Visual BasicVisual C++
public virtual NSString StringByReplacingOccurrencesOfStringWithStringOptionsRange(
	NSString target,
	NSString replacement,
	NSStringCompareOptions options,
	NSRange searchRange
Public Overridable Function StringByReplacingOccurrencesOfStringWithStringOptionsRange ( _
	target As NSString, _
	replacement As NSString, _
	options As NSStringCompareOptions, _
	searchRange As NSRange _
) As NSString
virtual NSString^ StringByReplacingOccurrencesOfStringWithStringOptionsRange(
	NSString^ target, 
	NSString^ replacement, 
	NSStringCompareOptions options, 
	NSRange searchRange
target (NSString)
The string to replace.
replacement (NSString)
The string with which to replace target.
options (NSStringCompareOptions)
A mask of options to use when comparing target with the receiver. Pass 0 to specify no options.
searchRange (NSRange)
The range in the receiver in which to search for target.
Return Value
A new string in which all occurrences of target, matched using options, in searchRange of the receiver are replaced by replacement.
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)