ReplaceString

Category: Script / Strings
Since engine version: 8.0 OC

Description

Returns a string in which all occurrences of a substring (from) got replaced by a different string (to).

Syntax

string ReplaceString(string text, string from, string to);

Parameters

text:
Source string in which the replacements occur.
from:
Old substring to be replaced.
to:
New substring by which the old substrings will be replaced.

Example

Log(ReplaceString("An apple a day keeps the apple away.", "apple", "banana"));
Displays "An banana a day keeps the banana away."
See also: RegexReplace
Sven2, 2016-07