#pragma mark -- 判断字符串是否是纯数字
+ (BOOL)isPureInt:(NSString *)string{
NSScanner* scan = [NSScanner scannerWithString:string];
int val;
return [scan scanInt:&val] && [scan isAtEnd];
}
#pragma mark -- 判断字符串是否是纯数字
+ (BOOL)isPureInt:(NSString *)string{
NSScanner* scan = [NSScanner scannerWithString:string];
int val;
return [scan scanInt:&val] && [scan isAtEnd];
}
转载于:https://www.cnblogs.com/qwer-BHS/p/5315981.html