P
Perfect Reign
I'm writing an application which has a text area in one of the classes.
I'm saving the information from the text area to a flat file - cvs
formatted. (Don't ask why, it just is so.) Anyway, I need to capture the
line breaks so that I can put a \n in my flat file for reloading the text
into the text area with the line breaks and so my flat file doesn't have
line breaks.
I'm thinking there's got to be some way of searching using firstindexof or
something like that. However, I can't find how to search for a line break
or carriage return (ASCII 10 or 13.)
I'm thinking I'd have to do something like:
String textarea = textComments.getText();
int index = textarea.firstIndexOf( CHR(10) );
Then I'd split the text and create a new string with the \n character.
I'm saving the information from the text area to a flat file - cvs
formatted. (Don't ask why, it just is so.) Anyway, I need to capture the
line breaks so that I can put a \n in my flat file for reloading the text
into the text area with the line breaks and so my flat file doesn't have
line breaks.
I'm thinking there's got to be some way of searching using firstindexof or
something like that. However, I can't find how to search for a line break
or carriage return (ASCII 10 or 13.)
I'm thinking I'd have to do something like:
String textarea = textComments.getText();
int index = textarea.firstIndexOf( CHR(10) );
Then I'd split the text and create a new string with the \n character.