Replace

Top  Previous  Next

function Replace(sSource As String, sSearchStr As String, sReplaceStr As String) As String

 

Returns a string in which a specified substring has been replaced with another substring.

 

Replace is case-sensitive.

 

Parameters

 

sSource ... String expression containing substring to replace.
sSearchStr ... Substring being searched for.
sReplaceStr ... Replacement substring.

 

Example:

Dim s

 

= "This is a text"

= Replace(s, "text", "number")

' returns s = "This is a number"




Translate document: