Skip navigation.
 
mlRe: How do I convert NSNumber value to NSString?
FROM : Lee Morgan
DATE : Sat Apr 09 23:26:09 2005

How about simply

NSString *myString = [aNumber stringValue];

So...
NSLog([aNumber stringValue]);

Also the two following are very handy at times...
NSLog(@"%@", aNumber);        // Log any cocoa object
NSLog([aNumber description]);    // Log a string description of any cooca 
object

- lee


On Apr 9, 2005, at 5:21 PM, Jerry Brace wrote:

> Is there a way to convert a NSNumber value to a NSString?
>
> I'm trying to do a NSLog on a numeric value - I am assuming my error 
> is that the value is numeric and I would need to convert it to a 
> string.
>
>
> Jerry Brace
> Web and Multimedia Developer
> <email_removed>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Cocoa-dev mailing list      (<email_removed>)
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/cocoa-dev/
> <email_removed>
>
> This email sent to <email_removed>
>

Related mailsAuthorDate
mlHow do I convert NSNumber value to NSString? Jerry Brace Apr 9, 23:21
mlRe: How do I convert NSNumber value to NSString? Lee Morgan Apr 9, 23:26
mlRe: How do I convert NSNumber value to NSString? Mike Ferris Apr 11, 16:35