I have a question about formatting a string. I have a timer in my app that displays hour:min:sec. Right now I am using this line:
Code:
NSString *nssTimer = [NSString stringWithFormat:@"%2i:%2i:%2i", nsiTimerHour, nsiTimerMin, nsiTimerSeconds];
to format the string. The problem is that is ends of looking like this
#: #: #
when the numbers are less than ten. I want it to look like this
##:##:##
regardless of what the values are.
Is there a way to achieve that?