Re: Parsing STDout into an NSDictionary
Re: Parsing STDout into an NSDictionary
- Subject: Re: Parsing STDout into an NSDictionary
- From: "Philip Q" <email@hidden>
- Date: Mon, 26 Feb 2007 00:23:48 +1300
On 25/02/07, Nick Forge <email@hidden> wrote:
Is there any easy way to use an existing class to parse a whitespace
and newline delimited string into an NSDictionary? I'm really just
being lazy, as I'm quite experienced with C and I can easily write a
parsing loop to deal with it, but I just thought I'd check if there's
an easier way to do it in Cocoa.
Take a look at NSScanner, it's *very* useful for parsing arbitrarily
formatted text. It won't get it straight into an NSDictionary, but
it'll take all of the hard work out of it.
-Phil
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden