• 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
String Formating
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

String Formating


  • Subject: String Formating
  • From: Sandro Noel <email@hidden>
  • Date: Fri, 15 Dec 2006 22:54:13 -0500

Greetings.

I wish to format a tring from a floting point value.
right now i'm using
return [NSString stringWithFormat:@"%.2fGB",gigabytes];

witch is perfect if there is 1.25GB
but i would also like to display it as 1GB if the number turn's out to be 1.00
is it possible to make the format conditional?


I looked up in the examples and found nothing showing.

thanks for your help.

Sandro Noel.
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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


  • Prev by Date: Re: Database Application?
  • Next by Date: Re: Slider in menu (like System Volume)
  • Previous by thread: Re: View Question
  • Next by thread: String Formating
  • Index(es):
    • Date
    • Thread