Re: NSString stringWithFormat woes
Re: NSString stringWithFormat woes
- Subject: Re: NSString stringWithFormat woes
- From: Randall Meadows <email@hidden>
- Date: Tue, 8 Apr 2008 18:05:50 -0600
On Apr 8, 2008, at 1:33 PM, Stuart Green wrote:
Hi,
I have a string declaration of:
returnString = [NSString stringWithFormat:@"%c-%i-%i-%f",
asciiString, firstDouble, secondDouble, thirdDouble];
If asciiString really is an ASCII (null-terminated) string, then you
need to use %s, not %c.
And if those first- and secondDouble variables are really doubles,
then you display them with %e or %f or %g, not %i.
_______________________________________________
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