• 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: Formatting double values
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Formatting double values


  • Subject: Re: Formatting double values
  • From: j o a r <email@hidden>
  • Date: Sun, 10 Oct 2004 02:24:18 +0200

Perhaps simply something like this:

NSString *doubleString = [NSString stringWithFormat: @"%.4f", myDouble];

Check "man printf" for more info.

j o a r

On 2004-10-10, at 02.17, Christoph Lauterbach wrote:

I've searched in the Foundation API Reference, but I haven't found the
answer:

How can I format a double value (i.e. 0.0000) and return it as a NSString?

I expect there is a connection between NSString and NSNumberFormatter...

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
  • Follow-Ups:
    • Re: Formatting double values
      • From: "Christoph Lauterbach" <email@hidden>
References: 
 >Formatting double values (From: "Christoph Lauterbach" <email@hidden>)

  • Prev by Date: Re: Formatting double values
  • Next by Date: Re: debug problem [insane]
  • Previous by thread: Re: Formatting double values
  • Next by thread: Re: Formatting double values
  • Index(es):
    • Date
    • Thread