MultiLoader-Template/node_modules/es-toolkit/dist/string/trim.d.ts
3944Realms 768f38fc97 feat: 可使用的构建模板
修改了脚本,使其可以推给Maven仓库
2026-05-03 13:02:19 +08:00

16 lines
616 B
TypeScript

/**
* Removes leading and trailing whitespace or specified characters from a string.
*
* @param {string} str - The string from which characters will be trimmed.
* @param {string | string[]} chars - The character(s) to remove from the string. Can be a single character or an array of characters.
* @returns {string} - The resulting string after the specified characters have been removed.
*
* @example
* trim(" hello "); // "hello"
* trim("--hello--", "-"); // "hello"
* trim("##hello##", ["#", "o"]); // "hell"
*/
declare function trim(str: string, chars?: string | string[]): string;
export { trim };