Re: Text to String literal conversion
- From: "Jeff Higgins" <oohiggins@xxxxxxxxx>
- Date: Sun, 30 Mar 2008 21:18:56 -0400
Patricia Shanahan wrote:
In connection with writing some unit tests, I need a utility to convert
text output to a String constant expression.
http://www.snible.org/java2/uni2java.html is almost exactly what I want,
but I would prefer the literals broken at newlines and concatenated.
That is:
aaa\bbb
kkk
gets converted to "aaa\\bbb\nkkk\n". I would prefer:
"aaa\\bbb\n" +
"kkk\n"
This seems like a wheel that should already exist, so I would rather not
invent it myself.
freemarker.template.utility.StringUtil
Should get you as close as the above mentioned.
<http://freemarker.org/>
Patricia
.
- References:
- Text to String literal conversion
- From: Patricia Shanahan
- Text to String literal conversion
- Prev by Date: Re: Which book to choose?
- Next by Date: Re: Using HEAD TRACE OPTIONS with http
- Previous by thread: Text to String literal conversion
- Index(es):