Are you required to use Java 1.1? If you can use later versions, the problem is easy to resolve using regular expressions.
Joined: Sep 26, 2006
You need to do some research on the topic of "newlines". Newlines are invisible characters in your String that create blank lines when the String is output. Just like regular characters, the invisible newline characters can be removed from a String. So, your problem is almost the same as trying to remove all the d's from the String. The difficulty is that the invisible character(s) that make up a newline are different on different operating systems.
Windows: \r\n Mac: \r Unix: \n
So, you have to come up with a solution that works for all three operating systems.
In addition, you don't want to remove all the newlines. If you did that, your String would just be one line of text. [ October 05, 2006: Message edited by: sven studde ]
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com