reports/frontend/node_modules/es-toolkit/dist/compat/string/trim.d.ts
jtricerolph 1c411e402e Add settings page for managing forecasting API key and URL via UI
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-20 14:37:36 +00:00

29 lines
No EOL
1.2 KiB
TypeScript

//#region src/compat/string/trim.d.ts
/**
* Removes leading and trailing whitespace or specified characters from a string.
*
* @param str - The string from which leading and trailing characters will be trimmed.
* @param chars - The character(s) to remove from the end of the string. Defaults to `" "`.
* @returns The resulting string after the specified leading and trailing characters have been removed.
*
* @example
* trim(" hello "); // "hello"
* trim("--hello--", "-"); // "hello"
* trim("##hello##", ["#", "o"]); // "hell"
*/
declare function trim(string?: string, chars?: string): string;
/**
* Removes leading and trailing whitespace or specified characters from a string.
*
* @param str - The string from which leading and trailing characters will be trimmed.
* @param chars - The character(s) to remove from the end of the string. Defaults to `" "`.
* @returns The resulting string after the specified leading and trailing characters have been removed.
*
* @example
* trim(" hello "); // "hello"
* trim("--hello--", "-"); // "hello"
* trim("##hello##", ["#", "o"]); // "hell"
*/
declare function trim(string: string, index: string | number, guard: object): string;
//#endregion
export { trim };