取消小数多余的0

   NSNumberFormatter *nf = [[NSNumberFormatter alloc] init];

    nf.numberStyle = kCFNumberFormatterRoundFloor;

   NSString *string = [nf stringFromNumber:[NSNumber numberWithDouble:[price doubleValue]]];

    NSLog(@"%@",string);

 

posted @ 2015-04-14 09:37  心软是病zzzz  阅读(154)  评论(0编辑  收藏  举报