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
Examples
- replace("hello hello world", "hello", "hi") returns hi hi world
