Javascript String padRight(pad)
String.prototype.padRight = function(pad) { return this + pad.substring(0, pad.length - this.length); }