ActiveReports 12
Replace Method

GrapeCity.ActiveReports.v12 Assembly > GrapeCity.Enterprise.Data.VisualBasicReplacement Namespace > Strings Class : Replace Method
Required. String expression containing substring to replace.
Required. Substring being searched for.
Required. Replacement substring.
Optional. Position within expression where substring search is to begin. If omitted, 1 is assumed.
Optional. Number of substring substitutions to perform. If omitted, the default value is –1, which means "make all possible substitutions."
Optional. Numeric value indicating the kind of comparison to use when evaluating substrings. See Settings for values.
Returns a string in which a specified substring has been replaced with another substring a specified number of times.
Syntax
'Declaration
 
Public Shared Function Replace( _
   ByVal expression As String, _
   ByVal find As String, _
   ByVal replacement As String, _
   Optional ByVal start As Integer, _
   Optional ByVal count As Integer, _
   Optional ByVal compare As CompareMethod _
) As String
public static string Replace( 
   string expression,
   string find,
   string replacement,
   int start,
   int count,
   CompareMethod compare
)

Parameters

expression
Required. String expression containing substring to replace.
find
Required. Substring being searched for.
replacement
Required. Replacement substring.
start
Optional. Position within expression where substring search is to begin. If omitted, 1 is assumed.
count
Optional. Number of substring substitutions to perform. If omitted, the default value is –1, which means "make all possible substitutions."
compare
Optional. Numeric value indicating the kind of comparison to use when evaluating substrings. See Settings for values.

Return Value

If find is zero-length or Nothing, Replace returns copy of expression. If Replace is zero-length, Replace returns copy of expression with no occurrences of find. If expression is zero-length or Nothing, or start is greater than length of expression, Replace returns Nothing. If count is 0, Replace returns copy of expression.
See Also

Reference

Strings Class
Strings Members