StringExtensionsReplace(String, String, String, StringComparison) Method

Replaces all occurrences of a specified string with another specified string. This method differs from the version found in the BCL by accepting a StringComparison instance

Definition

Namespace: PCBI_CadanceFab_Import
Assembly: PCBI_CadanceFab_Import (in PCBI_CadanceFab_Import.dll) Version: 16.0.0.0 (16.0.0.0)
C#
public static string Replace(
	this string input,
	string oldValue,
	string newValue,
	StringComparison comparisonType
)

Parameters

input  String
The input string to replace for
oldValue  String
The string to replace
newValue  String
The string that replaces oldValue
comparisonType  StringComparison
The way startsWith should be compared to the input string

Return Value

String
A reference to this instance with all instances of oldValue replaced by newValue in the range from startIndex to startIndex + total - 1

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