• 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: case-insensitive NSDictionary
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: case-insensitive NSDictionary


  • Subject: Re: case-insensitive NSDictionary
  • From: Michael Ash <email@hidden>
  • Date: Mon, 16 Mar 2009 10:37:21 -0400

On Mon, Mar 16, 2009 at 10:26 AM, Adam R. Maxwell <email@hidden> wrote:
>
> On Mar 16, 2009, at 7:02 AM, Roland King wrote:
>
>> Any good ideas for doing a key-case-insensitive NSDictionary of NSString
>> to NSString? I have some HTTP headers I want to stick in a dictionary and
>> look up later. HTTP headers have case-insensitive keys.
>
> Use a CFDictionary with custom key callbacks that have a case-insensitive
> hash and equality function.  You can then cast it to an NSDictionary for
> easier access.

Alas, toll-free bridging doesn't work properly when custom callbacks
are in effect. It *might* work for something as simple as this, but
you may have to use only the CF functions on it.

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

  • Follow-Ups:
    • Re: case-insensitive NSDictionary
      • From: "Adam R. Maxwell" <email@hidden>
References: 
 >case-insensitive NSDictionary (From: Roland King <email@hidden>)
 >Re: case-insensitive NSDictionary (From: "Adam R. Maxwell" <email@hidden>)

  • Prev by Date: Re: Type Declaration With Protocol
  • Next by Date: Re: Adding multiple NSTextViews inside one NSScrollView
  • Previous by thread: Re: case-insensitive NSDictionary
  • Next by thread: Re: case-insensitive NSDictionary
  • Index(es):
    • Date
    • Thread