function rpad( str, len, pad ) {
	var p;
	if ( !isString( str ) ) {
		throw new TypeError( format( 'invalid argument. First argument must be a string. Value: `%s`.', str ) );
	}
	if ( !isNonNegativeInteger( len ) ) {
		throw new TypeError( format( 'invalid argument. Second argument must be a nonnegative integer. Value: `%s`.', len ) );
	}
	if ( arguments.length > 2 ) {
		p = pad;
		if ( !isString( p ) ) {
			throw new TypeError( format( 'invalid argument. Third argument must be a string. Value: `%s`.', p ) );
		}
		if ( p.length === 0 ) {
			throw new RangeError( 'invalid argument. Pad string must not be an empty string.' );
		}
	} else {
		p = ' ';
	}
	if ( len > FLOAT64_MAX_SAFE_INTEGER ) {
		throw new RangeError( format( 'invalid argument. Output string length exceeds maximum allowed string length. Value: `%u`.', len ) );
	}
	return base( str, len, p );
}
Right pads a string such that the padded string has a length of at least `len`.

@param {string} str - string to pad
@param {NonNegativeInteger} len - minimum string length
@param {string} [pad=' '] - string used to pad
@throws {TypeError} first argument must be a string
@throws {TypeError} second argument must be a nonnegative integer
@throws {TypeError} third argument must be a string
@throws {RangeError} padding must have a length greater than `0`
@returns {string} padded string

@example
var str = rpad( 'a', 5 );
// returns 'a    '

@example
var str = rpad( 'beep', 10, 'p' );
// returns 'beeppppppp'

@example
var str = rpad( 'beep', 12, 'boop' );
// returns 'beepboopboop'