Replaces all occurrences of the keys in the replaceMap with the values.
replace("Hello, %name%!", { "%name%: "John" }) // "Hello, John!" Copy
replace("Hello, %name%!", { "%name%: "John" }) // "Hello, John!"
replace("Hello, %name%! Nice to meet you %name%!", { "%name%": "Jane" }) // "Hello, Jane! Nice to meet you Jane!" Copy
replace("Hello, %name%! Nice to meet you %name%!", { "%name%": "Jane" }) // "Hello, Jane! Nice to meet you Jane!"
source string
keys from this object will be replaced with values in source string
Replaces all occurrences of the keys in the replaceMap with the values.
Example
Example