Replace a substring of text within a string with another substring.
string strreplace <string:Text> <string:Old> <string:New>
| Name | Type | Comment |
|---|---|---|
| Text | string | A string, a substring of which is to be replaced. |
| Old | string | A substring of Text that is to be replaced. |
| New | string | A string that is to replace Old within Text. |
A string containing Text with all instances of Old replaced by New.
// replace "test" in "this is a test" with "awesome" echo <strreplace "This is a test" "test" "awesome">
… the output of which is written to the event log by echo as:
This is awesome
None.