Re: importing tab-delimited table (newbie)
Re: importing tab-delimited table (newbie)
- Subject: Re: importing tab-delimited table (newbie)
- From: Chris Hanson <email@hidden>
- Date: Sat, 5 Feb 2005 18:00:53 -0800
On Feb 5, 2005, at 2:14 PM, Daniel Child wrote:
I am wondering how to get tab-delimited data into one of the
collection classes. I have lists of data like this:
Since you control the input file, this will be pretty easy.
You can read the file into a string, use -[NSString
componentsSeparatedByString:] to chop that into an NSArray containing
one string per line, and use it again to chop each line string into an
NSArray containing one string per column.
As you're doing this you can build up any kind of object model you need
in your application.
Where things get complicated is if you need to handle variations in
file formats. But since you control it all in this situation, the
above should be sufficient.
-- Chris
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden