Fomratting numbers

Is there an easy way to format numbers?
I map the value of a potentiometer to 0 - 24 and if the value is < 10 it should do a leading 0.
So that it would print
00
01
02
03

09
10
11
and so on.

Of course I could do a simple if the value is < 10 but I thought maybe there is a built in function that does this.

Thanks

Make a temporary buffer (EDIT: and use sprintf) or use this: http://arduino.cc/forum/index.php/topic,120440.0.html

I did something like this for my real time clock to display a 01,02,02…
It has a lot of other junk in there but all it really does is push the number to the right and jam a zero in front if less than 0.

char second[2];
int tmpsecond = bcdToDec(Wire.receive());

if(tmpsecond < 10)
{
second[1] = second[0];
second[0] = ‘0’;
}
uoled.TextGraphic(112,10,SMALL_FONT,0xFFFF,1,1,second,1);

a simple if the value is < 10 construct is far faster than sprintf which can handle many formatting commands