Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Java Help > Text to String ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 12 Topic 15928 of 16566
Post > Topic >>

Text to String literal conversion

by Patricia Shanahan <pats@[EMAIL PROTECTED] > Mar 30, 2008 at 01:14 PM

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.

Patricia
 




 12 Posts in Topic:
Text to String literal conversion
Patricia Shanahan <pat  2008-03-30 13:14:00 
Re: Text to String literal conversion
"Jeff Higgins"   2008-03-30 21:18:56 
Re: Text to String literal conversion
Chase Preuninger <chas  2008-03-31 15:14:57 
Re: Text to String literal conversion
Roedy Green <see_websi  2008-04-01 02:20:55 
Re: Text to String literal conversion
"John B. Matthews&qu  2008-04-01 12:46:39 
Re: Text to String literal conversion
Roedy Green <see_websi  2008-04-01 18:50:32 
Re: Text to String literal conversion
"John B. Matthews&qu  2008-04-01 20:30:21 
Re: Text to String literal conversion
Roedy Green <see_websi  2008-04-02 19:45:23 
Re: Text to String literal conversion
"John B. Matthews&qu  2008-04-02 20:54:50 
Re: Text to String literal conversion
Roedy Green <see_websi  2008-04-03 03:05:57 
Re: Text to String literal conversion
"John B. Matthews&qu  2008-04-03 18:55:07 
Re: Text to String literal conversion
Roedy Green <see_websi  2008-04-04 03:55:03 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Nov 22 15:30:21 CST 2008.