Re: Reading in dictionary from txt file: options for speed
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