Skip to content

M_Ekstrand_Text_StringOperations_Replace_2

Fred Ekstrand edited this page Aug 4, 2020 · 1 revision

StringOperations.Replace Method (String, String[], String)

Returns a new string in which all occurrences of all substring in an array with the specified Unicode character.

Namespace: Ekstrand.Text
Assembly: StringOperations (in StringOperations.dll) Version: 1.0.0.3 (1.0.0.3)

Syntax

C#

public static string Replace(
	this string str,
	string[] stra,
	string strn
)

VB

<ExtensionAttribute>
Public Shared Function Replace ( 
	str As String,
	stra As String(),
	strn As String
) As String

C++

public:
[ExtensionAttribute]
static String^ Replace(
	String^ str, 
	array<String^>^ stra, 
	String^ strn
)

F#

[<ExtensionAttribute>]
static member Replace : 
        str : string * 
        stra : string[] * 
        strn : string -> string 

Parameters

 

str
Type: System.String
String to have its substring replaced.
stra
Type: System.String[]
String array of substring to be replaced.
strn
Type: System.String
String to replace all occurrences found.

Return Value

Type: String
Returns a new string with all occurrences of defined substrings replaced.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type String. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

See Also

Reference

StringOperations Class
Replace Overload
Ekstrand.Text Namespace

Clone this wiki locally