+ (NSInteger)getIntegerFromString:(NSString *)string {
NSCharacterSet *invertedSet = [[NSCharacterSet decimalDigitCharacterSet]invertedSet];
NSInteger resultInteger = [[string stringByTrimmingCharactersInSet:invertedSet] integerValue];
return resultInteger;
}
网友评论