arnyinc
06-13-2003, 03:26 PM
Is there any overwhelming reason to read a string into an array as opposed to just using substring to grab values from it?
I have filenames with a specific scheme that has date, topic, etc. embedded in it (i.e. 06122003_request_blahblah.doc) It is a very fixed format, so substring(0,8) will always be the date field and so on.
Since I am going to parse this, should I just use substring to grab everything I need or use substring to read it into an array and then play around with the array?
I guess performance is what I'm concerned about. Not so much ease of programming (that's trivial).
I have filenames with a specific scheme that has date, topic, etc. embedded in it (i.e. 06122003_request_blahblah.doc) It is a very fixed format, so substring(0,8) will always be the date field and so on.
Since I am going to parse this, should I just use substring to grab everything I need or use substring to read it into an array and then play around with the array?
I guess performance is what I'm concerned about. Not so much ease of programming (that's trivial).