[stringtemplate-interest] normalizing \n

Sam Harwell sharwell at pixelminegames.com
Sun Nov 8 17:26:53 PST 2009


The C# port already does this - I had to make it work before the unit
tests would pass. :)

-----Original Message-----
From: stringtemplate-interest-bounces at antlr.org
[mailto:stringtemplate-interest-bounces at antlr.org] On Behalf Of Terence
Parr
Sent: Sunday, November 08, 2009 3:06 PM
To: StringTemplate Mailing List
Subject: [stringtemplate-interest] normalizing \n

hiya. fyi, i'm normalizing templates so \n becomes \r\n or \n in  
output depending on platform. So, we can always use \n in templates.   
To force \r\n on unix, though, we can still create a writer:

         st.write(new AutoIndentWriter(sw,"\r\n")); // force \r\n as  
newline

Ter
_______________________________________________
stringtemplate-interest mailing list
stringtemplate-interest at antlr.org
http://www.antlr.org/mailman/listinfo/stringtemplate-interest


More information about the stringtemplate-interest mailing list