I have the following variable:
NSNumber *consumption = [dict objectForKey:@\"con\"];
Which returns 42. How can I pad this number to 10 dig
with variable num_digits
num_digits
NSString* format =[NSString stringWithFormat:@"%%0%zdzd", num_digits]; NSString *theString = [NSString stringWithFormat:format, 42];