Here you can find the source of rpad(pad_str, length)
// Pads strings to the right. String.prototype.rpad = function(pad_str, length) { var str = this; while (str.length < length) str = str + pad_str; return str;//from ww w . j av a 2 s . c om }
'use strict'; String.prototype.rpad = function(padString, length) { var str = this; while (str.length < length) { str = str + padString; return str; };
String.prototype.rpad = function(padString, length) { var str = this; while(str.length < length) str = str + padString; return str;
String.prototype.rpad = function(padString, length) { var str = this; while (str.length < length){ str = str + padString; return str;
String.prototype.rpad = function(padString, length) { var str = this; while (str.length < length) str = str + padString; return str; };
String.prototype.rpad = function(padString, length) { var str = this; while (str.length < length) str = str + padString; return str;