Javascript String Pad Extension
// Add padding function to String class
String.prototype.pad
= function (len, chr)
{
   var retStr = this.valueOf();
   while (retStr.length < len)
   {
      retStr = chr + retStr;
   }
   return retStr;
}
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License