index.js
function paddRight(str, length, what) {
	if (length <= str.length) {
		return str.substring(0, length);
	}
	what = what || ' ';
	return str + what.repeat(length - str.length);
}
function paddRight(str, length, what) {
	if (length <= str.length) {
		return str.substring(0, length);
	}
	what = what || ' ';
	return str + what.repeat(length - str.length);
}
function paddRight ( str , length , what ) { if ( length <= str . length ) { return str . substring ( 0 , length ) ; } what = what || ' ' ; return str + what . repeat ( length - str . length ) ; }
Padds or truncates a string right.
@param  {String} str    The string to be modified
@param  {Number} length Length of the final string
@param  {String} what   The padding string(should be one character)
@return {String}
Padds or truncates a string right .