摘要:
//检查银行卡是否合法//Luhn算法+(BOOL)isValidCardNumber:(NSString *)cardNumber{ NSString *digitsOnly = [Tool getDigitsOnly:cardNumber]; int sum = 0; int digit = 0; int addend = 0; BOOL timesTwo = false; for (int i = digitsOnly.length - 1; i >= 0; i--) { digit = [digitsOnly charact... 阅读全文