StringExtensionsReplace(String, String, String, Int32, Int32, StringComparison, Int32) Method
Replaces all occurrences of a specified string with another specified string.
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,
int startIndex,
int count,
StringComparison comparisonType,
out int total
)
<ExtensionAttribute>
Public Shared Function Replace (
input As String,
oldValue As String,
newValue As String,
startIndex As Integer,
count As Integer,
comparisonType As StringComparison,
<OutAttribute> ByRef total As Integer
) As String
public:
[ExtensionAttribute]
static String^ Replace(
String^ input,
String^ oldValue,
String^ newValue,
int startIndex,
int count,
StringComparison comparisonType,
[OutAttribute] int% total
)
[<ExtensionAttribute>]
static member Replace :
input : string *
oldValue : string *
newValue : string *
startIndex : int *
count : int *
comparisonType : StringComparison *
total : int byref -> string
- input String
- The input string to replace for
- oldValue String
- The string to replace
- newValue String
- The string that replaces oldValue.
- startIndex Int32
- The position in this instance where the substring begins
- count Int32
- The length of the substring.
- comparisonType StringComparison
- The way startsWith should be compared to the input string
- total Int32
- The total amount of input values that have been replaced
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).