Re: string to float
Re: string to float
- Subject: Re: string to float
- From: "Gary L. Wade" <email@hidden>
- Date: Fri, 04 Jul 2008 08:52:26 -0700
- Organization: DesiSoft Systems
If you've already parsed the text, just use NSNumber's class method
+numberWithDouble (or whichever other method is appropriate for your
needs). If you don't want to use your own parser, you can use NSScanner
on your text, but make sure you've set the locale to correctly interpret
the comma.
Robert Cerny wrote:
Hi folks,
I made a parser, which returns values like 10,45. It means, it has comma
as a decimal point delimiter, which is correct in my language. I was
trying to find a way to convert to NSNumber. Is it correct the the right
way is to use NSScanner?
Robert
_______________________________________________
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