Re: [newbie] numeric strings
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.