A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Search and replace \n in string
Joined: Mar 21, 2008
Dec 05, 2008 14:37:00
I need to remove all \n from a
so that its output on one line. I can do this using the following
however, to improve the code and its portability i was wondering how I could use unicode to do this.
Joined: Oct 13, 2005
Dec 05, 2008 14:59:00
Good idea to think about portability and other operating systems
There is a list of possible line-end characters in the
class; look for "line terminators." You can create a
to match them.
That might be one way to solve your problem.
I agree. Here's the link:
subject: Search and replace \n in string
How can a Class create an instance of itself??
Trouble printing a filled array
create n number of variables of different name at runtime
catching null in a StringTokenizer
Help! Problems with a method calling itself...
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014