Line Feed -- Need Help
Hi,
I have an array of string like below. I need to split this into three different chunks depending on the position of Carriage return Can someone please tell me the code for this? I am new to Java and I need this Urgently. Any help in this regard will be highly appreciated
example:- I need to put these a, b, c strings into 3 different variables.
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
[764 byte] By [
RonyPonya] at [2007-10-3 7:43:52]

> Do you mean you want to separate the chunks by blank
> lines? And how do you want to store the individual
> chunks, in separate String[]s?
Yes I want to store these 3 strings in different variables.
for examples stringa = aaaaaaaaaaaaaaaaaa
stringb = bbbbbbbbbbbbbbbbbb
stringc = ccccccccccccccccccccc
Ok Let me explain in detail. Say these texts are in a NotePad. My Program should read tex file. As soon as this hits the Lineor \n, this should put all the characters upto this point into one string variable. In this case, at the end of a's there is a line feed. So all aaaaa's should be put into one string variable. Then the next Line feed comes at the end of B's so all the bbbbb's should be put in another variable. And So on.
I hope this clarifies what I am intending to do.