templateString

fun templateString(string: String, onErrorAction: () -> Unit, templateAction: (String) -> String): String

Template the given string string using templateAction.

Parameters

string

The string to template. It doesn't necessarily have to be HTML

onErrorAction

Runs when the Kotlin templated area is unclosed.

templateAction

Given what the template contains, returns what it should be replaced with.