Re: Looking for [NSNumber numberWithString:]
Re: Looking for [NSNumber numberWithString:]
- Subject: Re: Looking for [NSNumber numberWithString:]
- From: Kiel Gillard <email@hidden>
- Date: Thu, 2 Apr 2009 12:33:14 +1100
As far as I know, this is the simplest way:
NSNumber *number = [NSNumber numberWithDouble:[@"3.14159" doubleValue]];
Kiel
On 02/04/2009, at 12:17 PM, Greg Robertson wrote:
I would like to convert an NSString to an NSNumber. Is there a direct
method for this or should I go NSString to double and then double to
NSNumber?
Thanks
Greg
_______________________________________________
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
_______________________________________________
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