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
Namespace: PCBI_CadanceFab_ImportAssembly: PCBI_CadanceFab_Import (in PCBI_CadanceFab_Import.dll) Version: 16.0.0.0 (16.0.0.0)
public static string Replace(
this string input,
string oldValue,
string newValue,
StringComparison comparisonType
)
<ExtensionAttribute>
Public Shared Function Replace (
input As String,
oldValue As String,
newValue As String,
comparisonType As StringComparison
) As String
public:
[ExtensionAttribute]
static String^ Replace(
String^ input,
String^ oldValue,
String^ newValue,
StringComparison comparisonType
)
[<ExtensionAttribute>]
static member Replace :
input : string *
oldValue : string *
newValue : string *
comparisonType : StringComparison -> string
- 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
StringA reference to this instance with all instances of oldValue replaced by newValue in the range from startIndex to startIndex + total - 1In 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).