Javascript String rpad(padString, length)
//pads right/*from ww w.j a v a 2s . com*/ String.prototype.rpad = function(padString, length) { var str = this; while (str.length < length) str = str + padString; return str; }
'use strict';//from w w w . ja va 2s . co m /* eslint-disable no-extend-native */ String.prototype.rpad = function(padString, length) { let str = this; while (str.length < length) { str = str + padString; } return str; };
//pads right/*from ww w . j a v a 2 s. c o m*/ String.prototype.rpad = function(padString, length) { var str = this; while(str.length < length) str = str + padString; return str; };