Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CFStringRef to hexa



Casting to a longint isn't going to do what you want!

I would convert to a UTF8 C string and use sscanf with "%lx" to get the number out. I'm guessing this should be safe as the numbers and letters *should* be single byte characters.

I guess what we really want is CFsscanf and CFsprintf...

Cheers,

Steve.

On 30 Jun 2006, at 10:14, Matthias Schmidt wrote:

Am/On Fri, 30 Jun 2006 01:56:52 -0700 schrieb/wrote Alex Ivanov:

Is there a way to convert a CFStringRef which
represents a number in hexadecimal to an actual number?

you probably can cast it to a longint. But why would you want to do so ?


All the best

Matthias

-----------------------------------------------
Admilon Consulting GmbH
http://www.admilon.com
Tel. +81-736-56-3905
-----------------------------------------------

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/steve% 40improvision.com


This email sent to email@hidden

Steve Baxter Software Development Manager Improvision +44-2476-692229

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden

This email sent to email@hidden
References: 
 >CFStringRef to hexa (From: Alex Ivanov <email@hidden>)
 >Re: CFStringRef to hexa (From: "Matthias Schmidt" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.