String.Replace Method

Top 

Description

Returns a modified copy of the calling String in which occurrences of stringToReplace have been replaced with replacementString.

 

Timing Precision Mode

This page describes functionality in nanosecond timing precision mode.

Click here to see the documentation for this object in millisecond timing precision mode.

 

Overload List

Signatures

Return Value

Description

String.Replace(String stringToReplace, String replacementString)

String

Returns a modified copy of the calling String in which all occurences of stringToReplace have been replaced with replacementString.

String.Replace(String stringToReplace, String replacementString, Variable replaceType)

String

Returns a modified copy of the calling String in which occurences of stringToReplace have been replaced with replacementString. When replaceType is "All" every occurence is replaced. When replaceType is "First" or "Last" only the first or last occurence is replaced respectively.

String.Replace(String stringToReplace, String replacementString, Variable replaceType, Variable replaceCount)

String

Returns a modified copy of the calling String in which occurences of stringToReplace have been replaced with replacementString and stores the number of replacements made in replaceCount. When replaceType is "All" every occurence is replaced. When replaceType is "First" or "Last" only the first or last occurence is replaced respectively.

 

 

See also

String Object

Parsing Dates and Times

Parsing Arbitrary String Data

Parsing Arbitrary String Data