• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Need help parsing a large text file one line at a time
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Need help parsing a large text file one line at a time


  • Subject: Re: Need help parsing a large text file one line at a time
  • From: Jens Alfke <email@hidden>
  • Date: Mon, 9 Jun 2008 15:08:33 -0700

You'd need to open the file using NSStream, NSFileHandle or regular c stdio, then read chunks out of it and break them into lines.

--Jens          // via iPhone

On Jun 9, 2008, at 2:04 PM, "Abel J. Almeida" <email@hidden > wrote:

I need help parsing a large text file.
I need to examine the file one line at a time.
It's a 128MB text file.

I used the stringWithContentsOfFile method from the NSString class, but the file is too large and it doesn't seem very optimized to me, because what I need is parse one line at a time not the entire text file._______________________________________________

Cocoa-dev mailing list (email@hidden)

Please 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
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please 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


References: 
 >Need help parsing a large text file one line at a time (From: "Abel J. Almeida" <email@hidden>)

  • Prev by Date: Re: Binding NSMenuItem state in Document-based app
  • Next by Date: Re: Handle mouse event (click) in CALayer sublayers
  • Previous by thread: Need help parsing a large text file one line at a time
  • Next by thread: Re: Need help parsing a large text file one line at a time
  • Index(es):
    • Date
    • Thread