• 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: Michael Ash <email@hidden>
  • Date: Fri, 17 Apr 2009 07:04:40 -0400

On Thu, Apr 16, 2009 at 10:52 PM, Marcel Weiher <email@hidden> wrote:
>
> On Apr 16, 2009, at 18:59 , Michael Ash wrote:
>
>> On Thu, Apr 16, 2009 at 2:47 PM, WT <email@hidden> wrote:
>>>
>>> since he'll be dealing with the string's raw bytes, won't Miles have to
>>> manually add a null byte to terminate the search string?
>>
>> The strnstr() function takes a length, and can thus be safely used on
>> buffers which contain no NUL byte.
>
> As far as I can tell it only takes one length, and that's for the string to
> be searched, so he will have to NULL-terminate the search string (which is
> what WT was talking about as far as I can tell).  Well that would be the
> case if strnstr() were actually useful for him, which I guess it isn't.

Yes, my bad. I thought he meant the string to be searched.

I like the terminology "needle" and "haystack" for these things. Hard
to get mixed up that way, and it seems to be nearly standard usage.

Anyway, carry on.

Mike
_______________________________________________

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

  • Prev by Date: Re: Create Library of Media File
  • Next by Date: Re: Setting up an auxiliary task for use with Distributed Objects
  • 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