main
Last change
on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
892 bytes
|
Rev | Line | |
---|
[d24f17c] | 1 | import padCharsEnd from './padCharsEnd';
|
---|
| 2 |
|
---|
| 3 | /**
|
---|
| 4 | * The function pads the current string with an empty string
|
---|
| 5 | * so that the resulting string reaches a given length.
|
---|
| 6 | * The padding is applied from the end of the current string.
|
---|
| 7 | *
|
---|
| 8 | * @func padEnd
|
---|
| 9 | * @memberOf RA
|
---|
| 10 | * @since {@link https://char0n.github.io/ramda-adjunct/2.22.0|v2.22.0}
|
---|
| 11 | * @category String
|
---|
| 12 | * @sig Number -> String -> String
|
---|
| 13 | * @param {number} targetLength The length of the resulting string once
|
---|
| 14 | * the current string has been padded
|
---|
| 15 | * @param {string} value String value to be padded
|
---|
| 16 | * @return {string} A new string of the specified length with the pad string
|
---|
| 17 | * applied at the end of the current string
|
---|
| 18 | * @see {@link RA.padCharsEnd|padCharsEnd}, {@link RA.padCharsStart|padCharsStart}, {@link RA.padStart|padStart}
|
---|
| 19 | * @example
|
---|
| 20 | *
|
---|
| 21 | * RA.padEnd(3, 'a'); // => 'a '
|
---|
| 22 | */
|
---|
| 23 | const padEnd = padCharsEnd(' ');
|
---|
| 24 |
|
---|
| 25 | export default padEnd;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.