int value = 200000; NSNumberFormatter * formatter = [NSNumberFormatter new]; [formatter setNumberStyle:NSNumberFormatterDecimalStyle]; NSString * newString = [formatter stringFromNumber:[NSNumber numberWithInteger:value]];
int aNum = 2000000; NSString *display = [NSNumberFormatter localizedStringFromNumber:@(aNum) numberStyle:NSNumberFormatterDecimalStyle];
时间: 2024-10-13 16:20:42