[stringtemplate-interest] C# - problem with NULL-replacement when having multiple values?

Christophe Vanderhaeghen christophe at soletis.be
Wed Dec 16 08:51:37 PST 2009


Hi,

According to the documentation found at this location:
<http://www.antlr.org/wiki/display/ST/Expressions>
http://www.antlr.org/wiki/display/ST/Expressions, the following should work,
right?

StringTemplate hello = new StringTemplate("Hello, $names; null=\"?\",
separator=\", \"$");
hello.SetAttribute("names", "test123");

hello.SetAttribute("names", null); // should become ?

hello.SetAttribute("names", "test456");

Console.Out.Write(hello.ToString());

The separator works well, but the NULL is not replaced. When I have a single
value, then the NULL-replacement works fine.

Could you confirm this behavior in C#?

Thanks in advance,

Christophe Vanderhaeghen

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/stringtemplate-interest/attachments/20091216/d8f8b552/attachment.html 


More information about the stringtemplate-interest mailing list