VirtualString.Replace(String, String, Variable) Method

Top 

Description

Returns a modified copy of the calling VirtualString 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.

 

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.

 

Method Signature

VirtualString.Replace(

String stringToReplace,


String replacementString,


Variable replaceType)

 

 

Arguments

stringToReplace


Description:

The string or character to find and replace in the returned String.

 

 

replacementString


Description:

The string or character to use in place of the substrings matched by stringToReplace.

 

 

replaceType


Description:

Specifies whether to replace all, the first, or the last occurences of stringToReplace in the returned String.

Valid Values:

Value

Label

0

All

1

First

2

Last

 

 

 

 

Return Value

Type:

string

 

 

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

 

Syntax

myString1 = myString2.ToLowercase().Replace(myString3, myString4, myVariable1);

 

 

See also

VirtualString Object

VirtualString.Replace