in reply to Prepending 0's to 1000

Just so you know, this type of thing is called "padding", specifically "padding with leading zeros".