|
Last change
on this file since ba17441 was a762898, checked in by istevanoska <ilinastevanoska@…>, 6 months ago |
|
Added visualizations
|
-
Property mode
set to
100644
|
|
File size:
945 bytes
|
| Rev | Line | |
|---|
| [a762898] | 1 | /**
|
|---|
| 2 | * Removes leading whitespace or specified characters from a string.
|
|---|
| 3 | *
|
|---|
| 4 | * @param {string} string - The string to trim.
|
|---|
| 5 | * @param {string} chars - The characters to trim from the start of the string.
|
|---|
| 6 | * @returns {string} Returns the trimmed string.
|
|---|
| 7 | *
|
|---|
| 8 | * @example
|
|---|
| 9 | * trimStart(' abc ');
|
|---|
| 10 | * // => 'abc '
|
|---|
| 11 | *
|
|---|
| 12 | * trimStart('-_-abc-_-', '_-');
|
|---|
| 13 | * // => 'abc-_-'
|
|---|
| 14 | */
|
|---|
| 15 | declare function trimStart(string?: string, chars?: string): string;
|
|---|
| 16 | /**
|
|---|
| 17 | * Removes leading whitespace or specified characters from a string.
|
|---|
| 18 | *
|
|---|
| 19 | * @param {string} string - The string to trim.
|
|---|
| 20 | * @param {string | number} index - The index parameter (used with guard).
|
|---|
| 21 | * @param {object} guard - Enables use as an iteratee for methods like `map`.
|
|---|
| 22 | * @returns {string} Returns the trimmed string.
|
|---|
| 23 | *
|
|---|
| 24 | * @example
|
|---|
| 25 | * trimStart(' abc ', 0, {});
|
|---|
| 26 | * // => 'abc '
|
|---|
| 27 | */
|
|---|
| 28 | declare function trimStart(string: string, index: string | number, guard: object): string;
|
|---|
| 29 |
|
|---|
| 30 | export { trimStart };
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.