• 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: [newbie] numeric strings
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [newbie] numeric strings


  • Subject: Re: [newbie] numeric strings
  • From: Robert Kuilman <email@hidden>
  • Date: Wed, 16 Jun 2004 13:40:50 +0200

Well,

the NSString class has the
- intValue
- floatValue
- doubleValue

selectors, which all return 0(.0) if the string not a valid {int,float,double} value.

see:
http://developer.apple.com/documentation/Cocoa/Reference/Foundation/ ObjC_classic/Classes/NSString.html#//apple_ref/doc/uid/20000154/ intValue

HTH!

Robert K.

-----------------------------{ Official Cocoa Newbie! }-----------------------------
web: http://halfduplex.net/
email: email@hidden

On Jun 16, 2004, at 12:23 PM, justin webster wrote:

is there an easy/efficient way to verify a string is a valid number?
other languages have an 'isNumeric' function, is there something like this in Obj-c?
_______________________________________________
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.



Robert K.

web: http://halfduplex.net/
email: email@hidden
------------------------------------------------------------------------ ---------------------
"Opportunity is missed by most people because it is dressed in overalls, and looks like work."
- Thomas Edison
_______________________________________________
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: 
 >[newbie] numeric strings (From: justin webster <email@hidden>)

  • Prev by Date: Defining a constant as private
  • Next by Date: Re: Panther's NSScreen vs. screen resolution changes
  • Previous by thread: [newbie] numeric strings
  • Next by thread: Re: [newbie] numeric strings
  • Index(es):
    • Date
    • Thread