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: Converting doubles to strings




On Nov 11, 2005, at 5:58 PM, David A. Lyons wrote:

On Nov 11, 2005, at 1:10 PM, Stephen Chu wrote:
I tried CFNumberFormatterGetValueFromString to convert a string to floating number. It happily accepts string like "1.2.aa" and converts it to 1.2 and returns true. Is there any way to report such error?

Yes, you have to examine the CFRange* parameter after the call to see how much of the string it used.

Great. Thanks. I missed that part when I read through the header.

--
Stephen Chu <mailto:email@hidden>
Rampage Systems, Inc. <http://www.rampageinc.com/>

_______________________________________________
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: 
 >Re: Converting doubles to strings (From: Laurence Harris <email@hidden>)
 >Re: Converting doubles to strings (From: Ian Anderson <email@hidden>)
 >Re: Converting doubles to strings (From: Stephen Chu <email@hidden>)
 >Re: Converting doubles to strings (From: "David A. Lyons" <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.