I am working on some dynamic code generation using String Template and need to manipulate the string being generated.
STG:
steps(appContext) ::= <<
<if(appContext.routes)>
<appContext.routes : {routeContext | <ProgressIndicator.Step title="<routeContext.path>"/>}; separator="n"><n>
<endif>
>>
routeContext.path has value as "/home"
which I need to change to "Home"
(Capitalize & remove /)
I tried using string functions replace(), toUpperCase(), toLowerCase() etc but they don’t work with STG. Any pointers how this can be achieved through STG?