/* Number.prototype 2005-09-15 */ Number.prototype.isNumber = true; function zerofill(keta){ return function(){return ("0".x(keta) + this).slice(-keta)} } // 指定桁数になるよう0で埋めたstringを返す Number.prototype.zerofill = function(keta){ return ("0".x(keta) + this).slice(-keta) } // 文字列に変換する際の関数を指定する Number.prototype.format = function(func){ this.toString = func; return this; }