* Pads `string` on the right side if it's shorter than `length`. Padding * characters are truncated if they exceed `length`. * * @static * @memberOf _ * @since 4.0.0 * @category String * @param {string} [string=''] The string to pad.
(string, length, chars)
| 25034 | * // => 'abc' |
| 25035 | */ |
| 25036 | function padEnd(string, length, chars) { |
| 25037 | string = toString(string); |
| 25038 | length = toInteger(length); |
| 25039 | |
| 25040 | var strLength = length ? stringSize(string) : 0; |
| 25041 | return (length && strLength < length) |
| 25042 | ? (string + createPadding(length - strLength, chars)) |
| 25043 | : string; |
| 25044 | } |
| 25045 | |
| 25046 | /** |
| 25047 | * Pads `string` on the left side if it's shorter than `length`. Padding |
nothing calls this directly
no test coverage detected