标签:
+ (NSString *)formatNumber:(NSString *)string
{
NSString *result = @"--";
if(string && string.length > 0 && ![string isEqualToString:result]){
if ([string floatValue] < 1000000) {
result = [NSString stringWithFormat:@"%.2f",[string floatValue]];
}else {
result = [NSString stringWithFormat:@"%d",[string intValue]];
}
}
return result;
}
标签:
原文地址:http://www.cnblogs.com/fantasy3588/p/4655265.html