replace

Replaces occurrences of substring1 in a string with substring2,
in a specified scope. The search is case-sensitive. Function returns original string with replacements made.

replace(String, substring1, substring2 [, scope]) → returns String

replace Function Argument Reference

Name Required Default Description
String Yes String to search
substring1 Yes Substring to find within string
substring2 Yes Substring to replace substring1 with
scope No one * one: replace the first occurrence
* all: replace all occurrences

Example Values:

  • one
  • all

Fork me on GitHub