text/StringTemplate

cover String
from:Char*
method formatTemplate(values: HashMap<K,V>)String

Replace all template tokens in this with the matching value of values.

Example:

import text/StringTemplate
values := HashMap<String, String> new()
values put("what", "world") .put("suffix", "... yay")
"Hello {{ what }}! {{   suffix}}" formatTermplate(values) println()
// -> Hello world! ... yay

This Page