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

Using Android Volley to post an array to PHP -

python - How to add an model instance to a django queryset? -

angularjs - No 'Access-Control-Allow-Origin' error from local domain to public API -