Here you can find the source of lpad(padString, length)
//pads left// w w w .java 2 s .c o m String.prototype.lpad = function(padString, length) { var str = this; while (str.length < length) str = padString + str; return str; }
String.prototype.lpad = function(length, padString){ var str = this; while (str.length < length) str = padString + str; return str; };
String.prototype.lpad = function(pSize, pCharPad) var str = this; var dif = pSize - str.length; var ch = String(pCharPad).charAt(0); for (; dif>0; dif--) str = ch + str; return (str);
function fill(num) { return (num == 10 ? '' : '0') + num; String.prototype.lpad = function(pad, length) { var s = this; while (s.length < length) { s = pad + s; return s; ...
String.prototype.lpad = function(padLength, padString){ var s = this; while(s.length < padLength) s = padString + s; return s;
String.prototype.lpad = function(padString, length) { var str = this; while (str.length < length) str = padString + str; return str;
String.prototype.lpad = function(padString, length) { var str = this; while (str.length < length) str = padString + str; return str;
String.prototype.lpad = function(padString, length) { var str = this; while (str.length < length) str = padString + str; return str; };
String.prototype.lpad = function(padString, length) { var str = this; while (str.length < length) { str = padString + str; return str; };
String.prototype.lpad = function(padString, length) { var str = this; while(str.length < length) str = padString + str; return str;