In StringTemplate, is there a built-in way to render a string as uppercase, e.g. something like this:
my_template(component) ::= <<
<component.name; format="upper">
>>
... or do I have to use a custom renderer for this purpose?
In StringTemplate, is there a built-in way to render a string as uppercase, e.g. something like this:
my_template(component) ::= <<
<component.name; format="upper">
>>
... or do I have to use a custom renderer for this purpose?
I've just found it out by myself. The template in the question is correct. The only thing I need to do is register the built-in StringRenderer before rendering the template:
STGroup group = new STGroupFile("my_template.stg");
group.registerRenderer(String.class, new StringRenderer());