• 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: Obtaining a value from a hex representation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Obtaining a value from a hex representation


  • Subject: Re: Obtaining a value from a hex representation
  • From: Steve Mills <email@hidden>
  • Date: Fri, 08 Jan 2016 22:16:40 +0000 (GMT)

On Jan 08, 2016, at 03:58 PM, Carl Hoefs <email@hidden> wrote:

A user enters the hexadecimal representation of a number like "0x31C8FD" into a text field. The intValue of such strings is 0. Is there a Cocoa method (like .hexValue) to convert the hex representation string into a value?

Either use NSScanner or strtol if you have char* (or strtoll if it's longer than 8 hex chars).
Sent from iCloud's ridiculous UI, so, sorry about the formatting

 
_______________________________________________

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: Obtaining a value from a hex representation
      • From: Carl Hoefs <email@hidden>
  • Prev by Date: Re: Modifying Set via NSArrayController breaks Set in weird way
  • Next by Date: Re: Obtaining a value from a hex representation
  • Previous by thread: Re: Obtaining a value from a hex representation
  • Next by thread: Re: Obtaining a value from a hex representation
  • Index(es):
    • Date
    • Thread