Convert NSString to NSInteger?

The deals dealer picture The deals dealer · Jan 25, 2011 · Viewed 93.8k times · Source

I want to convert string data to NSInteger.

Answer

Aurum Aquila picture Aurum Aquila · Jan 25, 2011

If the string is a human readable representation of a number, you can do this:

NSInteger myInt = [myString intValue];