摘要: //检查银行卡是否合法//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... 阅读全文
posted @ 2013-07-10 12:11 yingkong1987 阅读(274) 评论(0) 推荐(0) 编辑