• 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: Reading in dictionary from txt file: options for speed
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Reading in dictionary from txt file: options for speed


  • Subject: Re: Reading in dictionary from txt file: options for speed
  • From: Scott Ribe <email@hidden>
  • Date: Thu, 16 Apr 2009 17:45:58 -0600
  • Thread-topic: Reading in dictionary from txt file: options for speed

No null terminator... Now it's perfectly possible the bytes will get written
into a zeroed block, and so there will be a null terminator purely by chance
some times, and not other times.

Why the NSData? Why not just get a C string from searchStr, if that's what
you want? Otherwise, in general an NSData is not a string; it won't end with
a 0 byte unless you put one there, and it can contain 0s mid-stream as well.
That's why it's got an explicit length.

--
Scott Ribe
email@hidden
http://www.killerbytes.com/
(303) 722-0567 voice


_______________________________________________

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: 
 >Re: Reading in dictionary from txt file: options for speed (From: Miles <email@hidden>)

  • Prev by Date: Re: Reading in dictionary from txt file: options for speed
  • Next by Date: Re: Reading in dictionary from txt file: options for speed
  • Previous by thread: Re: Reading in dictionary from txt file: options for speed
  • Next by thread: Re: Reading in dictionary from txt file: options for speed
  • Index(es):
    • Date
    • Thread