• 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: Read lines from very large text file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Read lines from very large text file


  • Subject: Re: Read lines from very large text file
  • From: glenn andreas <email@hidden>
  • Date: Tue, 03 Feb 2009 08:50:13 -0600


On Feb 2, 2009, at 11:25 PM, Seth Willits wrote:

On Feb 2, 2009, at 7:50 PM, Joar Wingfors wrote:

Before opening the file, either determine, guess, or be told what the encoding is. With that encoding, convert your delimiter string into raw bytes, then do byte-for-byte comparison on the file to find occurrences of that delimiter.

How do you know what delimiter string to use?

Well the original poster said he wants to read lines. So \r, \n, or \r\n is your delimiter. It depends on your usage.


As well as unicode LINE SEPARATOR (0x2028), and PARAGRAPH SEPARATOR (0x2029), which are recognized as line separators by NSString's getLineStart:end:contentsEnd:forRange and friends (if the file is one of several unicode encoding).



Glenn Andreas                      email@hidden
 <http://www.gandreas.com/> wicked fun!
Mad, Bad, and Dangerous to Know

_______________________________________________

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: 
 >Read lines from very large text file (From: Jacob Rhoden <email@hidden>)
 >Re: Read lines from very large text file (From: Alexander Spohr <email@hidden>)
 >Re: Read lines from very large text file (From: Jacob Rhoden <email@hidden>)
 >Re: Read lines from very large text file (From: Robert Martin <email@hidden>)
 >Re: Read lines from very large text file (From: Seth Willits <email@hidden>)
 >Re: Read lines from very large text file (From: Joar Wingfors <email@hidden>)
 >Re: Read lines from very large text file (From: Seth Willits <email@hidden>)
 >Re: Read lines from very large text file (From: Joar Wingfors <email@hidden>)
 >Re: Read lines from very large text file (From: Seth Willits <email@hidden>)

  • Prev by Date: Stroking a CATextLayer
  • Next by Date: Re: Stroking a CATextLayer
  • Previous by thread: Re: Read lines from very large text file
  • Next by thread: Re: Read lines from very large text file
  • Index(es):
    • Date
    • Thread