Remove all spaces on left and right.
Install
Install all functions of strman
yarn add strman
or just the trim function
yarn add strman.trim
Usage
import { trim } from 'strman'
// OR
import trim from 'strman.trim'
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
value |
String | String to remove spaces. |
||
char |
String |
<optional> |
' ' | if you need remove other char on boarders. |
Returns:
String without boarders spaces.
- Type
- String
Example
const title = ' strman '
trim(title)
// => 'strman'