Re: file parsing
Re: file parsing
- Subject: Re: file parsing
- From: Andreas Monitzer <email@hidden>
- Date: Thu, 2 Aug 2001 21:56:13 +0200
On Thursday, August 2, 2001, at 08:10 , Chris Gehlker wrote:
On 8/2/01 8:28 AM, "Mark Wridt" <email@hidden> wrote:
Hello all,
I am new to the list, and to Cocoa(I do have a C++ and
Java background). I am in the process of attempting
to read in a few tab dilimited files, parse them and
then write an ouput file with selected data. Obj-C is
most likely the issue here for me, and I was
wondering if anyone could help (with example code, or
perhaps some URL's)?
I think you'll have the best luck using straight C to read in the files.
If
the output file is also supposed to be tab delimited, you probably had
best
use straight C to write it out as well.
I disagree. Using NSString's componentsSeparatedByString:, you can
simplify the task to a few lines:
NSArray *data=[line componentsSeparatedByString:@"\t"];
Now you have an array of strings ("line" is one line of that text file).
andy
--
Discussion forthcoming.