|
JTextPane: omitting new line (\n) character
Hi i have some code that searches elements of a jtextpane from one element to another looking for key words. However when i get a new keyword from a new line, a new line character proceeds it.
At least i assume that's what happened because I concatenated my keywork with a proceeding 'before' and preceeding 'after' and it came out like this
before
forafter
instead of beforeforafter
is there any way to check and remove the new line character from the keyword or any way to prevent it happening.
Thanks.
|