转换为万单位iOS
2021-12-09 本文已影响0人
VickyLanLan
+ (NSString *)subscribeCountUnitChange:(NSInteger)count {
if (count/10000 == 0) {
return [NSString stringWithFormat:@"%ld",count];
}else{
NSInteger tenThouand = count/10000;
NSInteger thousand = count%10000/1000;
return [NSString stringWithFormat:@"%ld.%ld万",tenThouand,thousand>=5?thousand+1:thousand];
}
return @"0";
}