NSString *str = [NSString stringWithFormat:@"%g",12.10];
NSLog(@"str = %@",str);
输出:
str = 12.1
http://pubs.opengroup.org/onlinepubs/009695399/functions/printf.html
版权声明:本文为博主原创文章,未经博主允许不得转载。
NSString *str = [NSString stringWithFormat:@"%g",12.10];
NSLog(@"str = %@",str);
输出:
str = 12.1
http://pubs.opengroup.org/onlinepubs/009695399/functions/printf.html
版权声明:本文为博主原创文章,未经博主允许不得转载。