Re: Obtaining a value from a hex representation
Re: Obtaining a value from a hex representation
- Subject: Re: Obtaining a value from a hex representation
- From: Quincey Morris <email@hidden>
- Date: Fri, 08 Jan 2016 14:18:10 -0800
- Feedback-id: 167118m:167118agrif8a:167118s-TUX4t2QQ:SMTPCORP
On Jan 8, 2016, at 13:58 , Carl Hoefs <email@hidden> wrote:
>
> Is there a Cocoa method (like .hexValue) to convert the hex representation string into a value?
There are the ‘scanHex…’ methods in NSScanner. It’s a bit annoying to set up, but if you packaged it as a function it wouldn’t be bad. OTOH, if you go to that trouble, you may as well just examine the characters directly, assuming you just need ASCII digits.
_______________________________________________
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