i want to convert to convert nsstring to integer in objective-c can anybody help me in solving out this problem.
+2
A:
NSString integerValue/intvalue This is assuming that the value is an integer, if it's not you will have more work to do, but you don't make that clear in your question.
Rulmeq
2010-06-25 09:16:01
+2
A:
try this may work for you :
NSString *str = @"42";
int x = [str intValue];
Pranay Rana
2010-06-25 09:18:44
**Special Considerations**On Mac OS X v10.5 and later, use integerValue instead.
iwat
2010-06-25 15:31:07