标签:ios
- (NSString *)formatCardNumber:(NSString *)cardNum { NSNumber *number = @([cardNum longLongValue]); NSNumberFormatter *formatter = [NSNumberFormatter new]; [formatter setUsesGroupingSeparator:YES]; [formatter setGroupingSize:4]; [formatter setGroupingSeparator:@" "]; return [formatter stringFromNumber:number]; }
标签:ios
原文地址:http://blog.csdn.net/rainlesvio/article/details/39004731