Advice for processing strings/text?
Posted on 1997-12-15
I am just interested in some advice on this one, as many times I have done something new in Delphi only to find out later I could have done it alot easier! :-)
I am looking for advice on processing a text file. What I plan on doing is reading a text file, parsing it line by line, and char by char, and updating this same text file.
I may be removing lines, adding lines, or removing chars in the line. Because I really haven't done much text file processing like this in Delphi, my initial plans are to open the file, read the the line into an array, parse through it, and rewrite this line back to the file (or maybe just ignore it and get the next line).
I understand this is a brief explanation, but I am assuming that reading each line into an array an parsing through the array is the best way in Delphi. Can someone point me in the right direction on this, and is there some other way which I should research before doing it this way?
Thanks a bunch