How to convert NSString to Integer...
i mean.
NSString *one=@"1";
i want to get this value like this.. int t=1;
is it possible..?
pls help me thanks and regards... by raju
How to convert NSString to Integer...
i mean.
NSString *one=@"1";
i want to get this value like this.. int t=1;
is it possible..?
pls help me thanks and regards... by raju
NSString has an intValue (or the preferred "integerValue") method that can be used to parse the string to an int.
It would look something like this:
int i = [myString intValue];
Check out the docs here:
You can do something like the following:
NSString *one = @"1";
int t = [one intValue];
More discussion here: http://stackoverflow.com/questions/169925/how-to-do-string-conversions-in-objective-c/171486