MonobjcMonobjc Documented Class Library
StringByReplacingOccurrencesOfStringWithString Method (target, replacement)
NamespacesMonobjc.FoundationNSStringStringByReplacingOccurrencesOfStringWithString(NSString, NSString)

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

Original signature is '- (NSString *)stringByReplacingOccurrencesOfString:(NSString *)target withString:(NSString *)replacement'

Available in Mac OS X v10.5 and later.

Declaration Syntax
C#Visual BasicVisual C++
public virtual NSString StringByReplacingOccurrencesOfStringWithString(
	NSString target,
	NSString replacement
Public Overridable Function StringByReplacingOccurrencesOfStringWithString ( _
	target As NSString, _
	replacement As NSString _
) As NSString
virtual NSString^ StringByReplacingOccurrencesOfStringWithString(
	NSString^ target, 
	NSString^ replacement
target (NSString)
The string to replace.
replacement (NSString)
The string with which to replace target.
Return Value
A new string in which all occurrences of target in 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)