Objective c: Check if integer/int/number
In objective c, how can i check if a string/NSNumber is an integer or int You can use the intValue method on NSString: NSString *myString = @"123"; [myString intValue]; // returns (int)123 Here is the Apple documentation for it - it will return 0 if it's not a valid integer: http://developer.apple.com/mac/library/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/Reference/NSString.html#//apple_ref/occ/instm/NSString/intValue Hope that helps! Anshu Chimala If you're trying to determine whether or not an NSString has a numeric value or not, try using NSNumberFormatter . -(BOOL)