|
Last change
on this file was a762898, checked in by istevanoska <ilinastevanoska@…>, 5 months ago |
|
Added visualizations
|
-
Property mode
set to
100644
|
|
File size:
933 bytes
|
| Line | |
|---|
| 1 | /**
|
|---|
| 2 | * Removes trailing 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 end of the string.
|
|---|
| 6 | * @returns {string} Returns the trimmed string.
|
|---|
| 7 | *
|
|---|
| 8 | * @example
|
|---|
| 9 | * trimEnd(' abc ');
|
|---|
| 10 | * // => ' abc'
|
|---|
| 11 | *
|
|---|
| 12 | * trimEnd('-_-abc-_-', '_-');
|
|---|
| 13 | * // => '-_-abc'
|
|---|
| 14 | */
|
|---|
| 15 | declare function trimEnd(string?: string, chars?: string): string;
|
|---|
| 16 | /**
|
|---|
| 17 | * Removes trailing 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 | * trimEnd(' abc ', 0, {});
|
|---|
| 26 | * // => ' abc'
|
|---|
| 27 | */
|
|---|
| 28 | declare function trimEnd(string: string, index: string | number, guard: object): string;
|
|---|
| 29 |
|
|---|
| 30 | export { trimEnd };
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.