Codec ░ Variable length of accuracy of float in NSString

376Variable length of accuracy of float in NSString

float f = 1.23456;

NSLog(@"%.2f", f);
NSLog(@"%.0f", f);
NSLog(@"%.0f", f);

1.23
1
1.23456

381Zero-Padding 305Converting float to string %4.2f 287[^//]NSLog 246writeToFile – quick file writing 218Obj-C, Shortcut: Boolean return value to String