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...
CFStringCreateWithFormat and CFStringCreateWithFormatAndArguments
already exist for going one direction, but I can't find anything in
CFNumber of CFNumberFormatter to go the other way. Seems like there
should be. I'd submit a feature request if I were you. But in the
mean time, use sscanf.
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden