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:
792 bytes
|
Line | |
---|
1 | import padCharsStart from './padCharsStart';
|
---|
2 |
|
---|
3 | /**
|
---|
4 | * Pads string on the left side if it's shorter than length.
|
---|
5 | *
|
---|
6 | * @func padStart
|
---|
7 | * @memberOf RA
|
---|
8 | * @since {@link https://char0n.github.io/ramda-adjunct/2.25.0|v2.25.0}
|
---|
9 | * @category String
|
---|
10 | * @sig Number -> String -> String
|
---|
11 | * @param {number} targetLength The length of the resulting string once
|
---|
12 | * the current string has been padded
|
---|
13 | * @param {string} value String value to be padded
|
---|
14 | * @return {string} A new string of the specified length with the empty string
|
---|
15 | * applied to the beginning of the current string
|
---|
16 | * @see {@link RA.padCharsEnd|padCharsEnd}, {@link RA.padCharsStart|padCharsStart}, {@link RA.padEnd|padEnd}
|
---|
17 | * @example
|
---|
18 | *
|
---|
19 | * RA.padStart(3, 'a'); // => ' a'
|
---|
20 | */
|
---|
21 | const padStart = padCharsStart(' ');
|
---|
22 |
|
---|
23 | export default padStart;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.