aspose file tools*
The moose likes Java in General and the fly likes carriage return replace in string Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "carriage return replace in string" Watch "carriage return replace in string" New topic
Author

carriage return replace in string

Chris Reeves
Ranch Hand

Joined: Apr 03, 2002
Posts: 95
I need to replace end of line characters ('\n') with html breaks (br).
However, I'm stuck using jdk 1.3.1, so I don't have the luxury of regex.
Any quick and dirty low tech ideas out there?
Chris
Chris Reeves
Ranch Hand

Joined: Apr 03, 2002
Posts: 95
Must be a low brain power day - I solved my issue as I posted it.
I just move the string to a string buffer, in which I can do the replace, then do toString for output.
Thanks for listening.
Chris
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
No problem . Glad we could be so helpful .


"JavaRanch, where the deer and the Certified play" - David O'Meara
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
This has been another episode of JavaRanch playing the role of the Cardboard Analyst.


[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: carriage return replace in string