Skip to content

trim

Removed leading and trailing whitespace or specified characters from string

Basic Usage

argument

  • str: string: The string to trim.

returns

  • string: The trimmed string.
ts
import { trim } from 'func-dash'
trim('  Hello World  ') // 'Hello World'