String.Replace(string lookForText, string replaceWithText,
optional bool caseSensitive)
Creates a copy of this string, with all instances of lookForText replaced
with the replaceWithText.
caseSensitive is false by default, but you can set it to true so that only
case-sensitive matches of the lookForText will be replaced.
NOTE: The new string is returned from this function; it
does NOT modify the original string.
Example:
String original = "Hello from the script!";
String changed = original.Replace("hello", "goodbye");
Display("Old: %s, new: %s", original, changed);
will display "Old: Hello from the script!, new: goodbye from the script!".
Compatibility: Supported by AGS 3.1.0 and later versions.
See Also: String.ReplaceCharAt
|