Skip to content
Prev 255712 / 398506 Next

add zero in front of numbers

Dear Yan,

apart from formatC, you can also use sprintf, which works almost
exactly like the C sprintf function. To convert an integer x to a
string with 5 leading 0s, you do:

sprintf( "%05d", x )

Best regards,

j.
On Mon, Apr 4, 2011 at 12:35 PM, Yan Jiao <y.jiao at ucl.ac.uk> wrote: