• 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: Marcel Weiher <email@hidden>
  • Date: Thu, 16 Apr 2009 10:57:54 -0700


On Apr 16, 2009, at 10:10 , Miles wrote:

Marcel, NOW we're talking. This has really been such an eye-opening thread.

Now it's googling time to try to figure out how to search for a string in there.

1. Get the bytes out of your search string in the encoding that your dictionary is in
2. surround with '\n' characters to make sure you find whole words, not substrings
(you will need to add a leading '\n' to your strings file
3. Use strnstr() -- man strnstr()


Cheers,

Marcel

_______________________________________________

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


  • Follow-Ups:
    • Re: Reading in dictionary from txt file: options for speed
      • From: WT <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>)

  • Prev by Date: Re: Importing Word doc in Carbon app via Cocoa
  • Next by Date: IsBadCodePtr in Cocoa or Unix?
  • 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