You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
var repeat = require('./repeat'); |
|
var toStr = require('./toStr'); |
|
exports = function(str, len, chars) { |
|
str = toStr(str); |
|
var strLen = str.length; |
|
chars = chars || ' '; |
|
if (strLen < len) str = (repeat(chars, len - strLen) + str).slice(-len); |
|
return str; |
|
}; |
|
|
|
module.exports = exports;
|
|
|