• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSString stringWithFormat woes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >NSString stringWithFormat woes (From: Stuart Green <email@hidden>)

  • Prev by Date: NSString stringWithFormat woes
  • Next by Date: Re: NSUndoManager grouping somewhat broken?
  • Previous by thread: NSString stringWithFormat woes
  • Next by thread: Re: NSString stringWithFormat woes
  • Index(es):
    • Date
    • Thread