firstly, this is OT, secondly if you're using JDK 1.4, here's your one-liner (String in question is str):
str = str.replaceAll("\\n", "<br>"); which is a short way of writing: Pattern.compile("\\n").matcher(str).replaceAll("<br>"); also a one-liner... -- Voytek Jarnot Quidquid latine dictum sit, altum viditur. > -----Original Message----- > From: dario [mailto:[EMAIL PROTECTED] > Sent: Monday, March 03, 2003 12:46 PM > To: [EMAIL PROTECTED] > Subject: Re: displaying "\n" in html? > > > > "David Graham" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > LOL > > > > David > > > > > yeah, right, i could have expected so. i sent about five > questions to this > mailing list and i never NEVER got an answer. and i don't > think that the > reason is i ask stupid questions, in fact most of the > questions here are > much worse. > > >You're too lazy to write a one line method that does it? > > it is not that i am lazy, i didn't want to reinvent the > wheel, i wanted to > see what are the strategies for solving this. but of course, > there are smart > asses to tell you everything you are not interested in. > i'd love to see one-liner that converts char to string. > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]