Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Numbers in the form of 001

Is there a special name for numbers in the format of 001. For example the number 20 would be 020 and 1 would be 001.
Its hard to Google around when you don`t know somethings name!
Since I am already wasting your guys time does any one know a function for changing numbers to this format.

like image 244
James Andino Avatar asked Jul 25 '11 23:07

James Andino


3 Answers

I think this is usually called "padding" the number.

like image 127
Tikhon Jelvis Avatar answered Oct 14 '22 20:10

Tikhon Jelvis


It's called padding.

like image 27
GolezTrol Avatar answered Oct 14 '22 19:10

GolezTrol


Its called left zero padded numbers.

like image 43
Mrchief Avatar answered Oct 14 '22 18:10

Mrchief