replace text()
This function replaces the placeholders of the form $<placeholder> of a text a.
The placeholders must be present in a map b as keys with values.
The return value of the function is the text with the replaced placeholders.
Parameter
Parameter |
Description |
a |
Text with placeholders. |
b |
Name of the map with placeholder keys and values. |
Example
Assume there is a map “mymap” with an entry under the key “$name” and the value “Peter”.
Parameter a |
Parameter b |
Result |
Hi $name, how are you? |
mymap |
Hi Peter, how are you? |