Re: double to NSString
Re: double to NSString
- Subject: Re: double to NSString
- From: John Randolph <email@hidden>
- Date: Thu, 3 Jul 2003 16:17:32 -0700
On Thursday, July 3, 2003, at 3:38 PM, Jeff Harrell wrote:
double x;
[NSString stringWithFormat:@"%g", x];
(I think I got the syntax on that right. Doin it from memory, you
know.)
On Thursday, July 3, 2003, at 05:08 PM, Paul N. Schatz wrote:
Can someone tell me how to convert a double into an NSString? Google
search has a direct hit on this question but the link is down. TIA.
One other way:
float someQuantity;
NSSString *myFloatString = [[NSNumber numberWithFloat:someQuantity]
stringValue];
-jcr
John C. Randolph <email@hidden> (408) 974-8819
Sr. Cocoa Software Engineer,
Apple Worldwide Developer Relations
http://developer.apple.com/cocoa/index.html
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.