@newdash/newdash
Version:
javascript/typescript utility library
22 lines (21 loc) • 487 B
TypeScript
/**
* Removes leading and trailing whitespace or specified characters from `string`.
*
* @since 5.6.0
* @category String
* @param str The string to trim.
* @param chars The characters to trim.
* @returns Returns the trimmed string.
* @see [[trimEnd]],[[trimStart]]
* @example
*
* ```js
* trim(' abc ')
* // => 'abc'
*
* trim('-_-abc-_-', '_-')
* // => 'abc'
* ```
*/
export declare function trim(str: string, chars: string, guard?: any): string;
export default trim;