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

Re: double to NSString


  • Subject: Re: double to NSString
  • From: publiclook <email@hidden>
  • Date: Thu, 3 Jul 2003 19:12:09 -0400

From the NSString documentation at http://developer.apple.com/documentation/Cocoa/Reference/Foundation/ ObjC_classic/Classes/NSString.html

+ (id)stringWithFormat:(NSString *)format, ...
Returns a string created in the manner of localizedStringWithFormat:, but using the users default locale to format numbers. See Using Format Strings for more information.

See Also:  initWithFormat:

The Using Format Strings link is http://developer.apple.com/documentation/Cocoa/Conceptual/ DataFormatting/Tasks/FormatStrings.html

You want %f, %e, %E, %g or %G.

Its worth mentioning that both documents cited heer are on your hard disk.

You can also ask an NSNumber for its string value.

There are many other ways as well.

(This question is easily answered from a very casual inspection of your hard disk TQIEAFVCIYHD)

On Thursday, July 3, 2003, at 06:08 PM, Paul N. Schatz wrote:

Can someone tell me how to convert a double into an NSString? Google search has a direct hit on this question but the link is down. TIA.

Paul
--
--
Paul Schatz
Chem Dept
University of Virginia
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: double to NSString
      • From: Jeff Harrell <email@hidden>
References: 
 >double to NSString (From: "Paul N. Schatz" <email@hidden>)

  • Prev by Date: Re: Can I "share" a view between nibs?
  • Next by Date: Re: double to NSString
  • Previous by thread: Re: double to NSString
  • Next by thread: Re: double to NSString
  • Index(es):
    • Date
    • Thread