I am planning to break a long document in various strings, and save them as they are (so each string can have different length, i will not break them to strings with specific length).
I was planning to use an array, so as i scroll trough the document, i can just add each string to a position of the array and increment the index; and once that i am done, i can print the string one by one, keeping the original format of the document, and then nuke the array and start again with the next sequence.
Is this something that sounds correct or is there another data structure type that I could use, that would fit my needs and keep memory usage and processor cycles down to a reasonable level ( the documents that I have to process are pretty long and full of data, so I am concerned to keep too much busy the processor and use too much memory).
Thanks in advance!