• 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 to int (or double) conversion
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSString to int (or double) conversion


  • Subject: Re: NSString to int (or double) conversion
  • From: "Steven M.Palm" <email@hidden>
  • Date: Tue, 8 Jul 2003 09:26:10 -0500

On Tuesday, July 8, 2003, at 08:29 AM, Cyprien wrote:
I'm sorry to ask the same kind of question again, but now I'm trying to convert an NSString (like "512") into an int. (or a double)
And I've search the cocoa.mamasam.com, and found nothing.

NSString has both -intValue and -floatValue methods.

NSString *aString = @"512";
int myInt = [aString intValue];

For looking up things like this, might I suggest the great application "Cocoa Browser". :-) I know it really helps me out.

http://homepage2.nifty.com/hoshi-takanori/cocoa-browser/

-----------------------
- Steven M. Palm
- Ham Radio Call: N9YTY
- Attempts to make thine own star shine shall lead thee into darkness.
-----------------------
_______________________________________________
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.

References: 
 >NSString to int (or double) conversion (From: Cyprien <email@hidden>)

  • Prev by Date: Re: awakeFromNib and windowWillLoad : basic question
  • Next by Date: Re: Method without receiver
  • Previous by thread: Re: NSString to int (or double) conversion
  • Next by thread: Re: Simple Clock?
  • Index(es):
    • Date
    • Thread