[stringtemplate-interest] normalizing \n

Terence Parr parrt at cs.usfca.edu
Sun Nov 8 13:05:49 PST 2009


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


More information about the stringtemplate-interest mailing list