千位符的显示

用到数字格式器
+(NSString*)rmbdislayWithInteger:(NSInteger)rmb{
NSNumberFormatter * numberFormatter = [[NSNumberFormatter alloc] init];
[numberFormatter setFormatterBehavior: NSNumberFormatterBehavior10_4];
[numberFormatter setNumberStyle: NSNumberFormatterDecimalStyle];
NSString *numberString = [numberFormatter stringFromNumber: [NSNumber numberWithInteger: rmb]];

return numberString;

}

你可能感兴趣的:(千位符的显示)