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



CFNumberFormatterGetValueFromString...examine the CFRange* parameter after the call to see how much of the string it used.

On Nov 14, 2005, at 6:43 AM, Stephen Chu wrote:
This works pretty well for my text filtering task. But I do find something wrong with the range passed to CFNumberFormatterGetValueFromString. That is if the location is not 0, meaning start from the beginning, it still parse the string from the beginning. This makes converting a long string with several numbers in it impossible.

Does anyone else see this too?

Yes, I can reproduce the problem, with some initial difficulty. I was able to reproduce the problem by using CFStringCreateWithCharactersNoCopy, but not when I used CFStringCreateWithCharacters.


You can work around this by using CFStringCreateWithSubstring when you need to work with part of the string that doesn't start at the beginning.

Filed as <rdar://problem/4342607>.

--Dave

_______________________________________________
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>)
 >Re: Converting doubles to strings (From: Stephen Chu <email@hidden>)
 >Re: Converting doubles to strings (From: Stephen Chu <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.