replacePlaceholders
Replaces placeholders in this string. Uses the following placeholder format: {placeholder_name}
. Placeholders can be duplicated.
Example usage:
val template = "Name: {name}; Surname: {surname}; Full name: {name} {surname}"
template.replacePlaceholders("name" to "Josh", "surname" to "Long")
// "Name: Josh; Surname: Long; Full name: Josh Long"
Content copied to clipboard