Sha256: 0d7dbfd4c152d0d708fae720e32b238f23c6a79cb8ca295f74f2e1f6c949ecf6
Contents?: true
Size: 374 Bytes
Versions: 69
Compression:
Stored size: 374 Bytes
Contents
var toString = require('../lang/toString'); var repeat = require('./repeat'); /** * Pad string with `char` if its' length is smaller than `minLen` */ function rpad(str, minLen, ch) { str = toString(str); ch = ch || ' '; return (str.length < minLen)? str + repeat(ch, minLen - str.length) : str; } module.exports = rpad;
Version data entries
69 entries across 69 versions & 2 rubygems