[stringtemplate-interest] Order of Attributes

Terence Parr parrt at cs.usfca.edu
Sun Mar 2 13:42:06 PST 2008


On Feb 23, 2008, at 4:29 AM, Rabea Gransberger wrote:

> Hello,
>
> is there any way to question the Order of attributes in a  
> StringTemplate?
>
> I'd like to have some internationalization and have some properties
> files with entries like:
> plus=$right$ + $left§
>
> I take the String for plus and make a StringTemplate out of it, and  
> then
> I'd like to know if $right§ occurs first in the template or $left$.

Do you mean the references to the templates or the order which they  
were set? The order of the attributes is undefined unless you are  
talking about the order in which you reference them.

Ter
>
>
> Right now I determine if by myself by using indexOf on the String, but
> that's not the best solution because I may get the index of an similar
> String which is not an attribute of the template.
>
> Greetings,
> Rabea
> _______________________________________________
> stringtemplate-interest mailing list
> stringtemplate-interest at antlr.org
> http://www.antlr.org:8080/mailman/listinfo/stringtemplate-interest



More information about the stringtemplate-interest mailing list