/**
是否全数字
@param string
@return
*/
- (BOOL)isAllNum:(NSString *)string{
unichar c;
for (int i=0; i<string.length; i++) {
c=[string characterAtIndex:i];
if (!isdigit(c)) {
return NO;
}
}
return YES;
}
/**
是否全数字
@param string
@return
*/
- (BOOL)isAllNum:(NSString *)string{
unichar c;
for (int i=0; i<string.length; i++) {
c=[string characterAtIndex:i];
if (!isdigit(c)) {
return NO;
}
}
return YES;
}