Carrot reference
Functions

replace()

Replaces all substrings within a String with a different string.

Syntax

replace(string, search, replace)

  • string - the String value to operate on
  • search - the String value to search for
  • replace - the String value to replace in place of any instances of search
  • Return type: String

Examples

  • replace("hello hello world", "hello", "hi") returns hi hi world