How do I convert a string into an integer in objective C? -



How do I convert a string into an integer in objective C? -

possible duplicate: how string conversions in objective-c?

i trying convert user's guess integer. how do that?

this trivial in objective-c...

nsstring *inputstring = @"75"; int value = [inputstring intvalue];

you can utilize floatvalue, doublevalue or (i believe) boolvalue convert nsstring other types. here page lists mutual tasks may need perform strings;

http://borkware.com/quickies/one?topic=nsstring

objective-c string int

Comments

Popular posts from this blog

java - How to set log4j.defaultInitOverride property to false in jboss server 6 -

c - GStreamer 1.0 1.4.5 RTSP Example Server sends 503 Service unavailable -

Using ajax with sonata admin list view pagination -