I need a simple template engine, that only does variable names replacement (I don't need other features), and can be configured to use delimiters that are strings, not characters. E.g.
new Template("Hello {{topic}}")
.add("topic", "world")
.render()
Should return "Hello world" (the java code can change, I care more about the template syntax)
The reason I want multi-character delimiters is that I have several templates that may contain all kinds of characters, and would like to make sure the native languages of the templated documents (html, css, js) don't collide with the template engine.
After reading this post, I tried to using StringTemplate, but I'm not sure if it supports delimiters that are more than one character long (The constructor on ST
seems to accept character delimiters instead of strings).
Does StringTemplates support multi-character delimiters? If not, any recommendations of another simple template engine that works with the template syntax I described above?