PDA

View Full Version : Issue with stringWithFormat




swimdev
Feb 2, 2009, 11:16 AM
I'm wanting to have a leading zero for any number less than ten (ie 01, 02, 03)

i though stringWithFormat:@"%2.1f" would work, but doesn't.

any suggestions?



HiRez
Feb 2, 2009, 12:33 PM
Try @"%02.1f" (that's a zero, not an "oh")

swimdev
Feb 2, 2009, 02:03 PM
EDIT:ok I'm good