source: node_modules/es-toolkit/dist/string/trim.d.ts

Last change on this file was a762898, checked in by istevanoska <ilinastevanoska@…>, 5 months ago

Added visualizations

  • Property mode set to 100644
File size: 616 bytes
Line 
1/**
2 * Removes leading and trailing whitespace or specified characters from a string.
3 *
4 * @param {string} str - The string from which characters will be trimmed.
5 * @param {string | string[]} chars - The character(s) to remove from the string. Can be a single character or an array of characters.
6 * @returns {string} - The resulting string after the specified characters have been removed.
7 *
8 * @example
9 * trim(" hello "); // "hello"
10 * trim("--hello--", "-"); // "hello"
11 * trim("##hello##", ["#", "o"]); // "hell"
12 */
13declare function trim(str: string, chars?: string | string[]): string;
14
15export { trim };
Note: See TracBrowser for help on using the repository browser.