• 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: NSUInteger hash
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSUInteger hash


  • Subject: Re: NSUInteger hash
  • From: Nick Zitzmann <email@hidden>
  • Date: Sat, 16 Aug 2008 15:04:50 -0600


On Aug 16, 2008, at 1:57 PM, Steve Wart wrote:

What's the standard way of hashing non-object values in Cocoa?


Something like this ought to work: (warning - written in Mail, untested, use at your own risk)

[[NSNumber numberWithUnsignedInteger:someNSUInteger] hash];

You can use NSValue to turn other Foundation data structures into objects.

Nick Zitzmann
<http://www.chronosnet.com/>

_______________________________________________

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: 
 >NSUInteger hash (From: "Steve Wart" <email@hidden>)

  • Prev by Date: Re: Preferred Wrapper for TCP Sockets Over Local Network?
  • Next by Date: Re: NSUInteger hash
  • Previous by thread: NSUInteger hash
  • Next by thread: Re: NSUInteger hash
  • Index(es):
    • Date
    • Thread