Javascript Number Format0(size)

Description

Javascript Number Format0(size)

Number.prototype.Format0 = function (size) {
 var zeros = '00000000000000000000000000000000000000000000000000000'.substr(0, size);
 var str = this.toString();
 return zeros.substr(0, zeros.length - str.length) + str;
}



PreviousNext

Related