trim-right-x
This method removes whitespace from the right end of a string.
trim-right-x.trimRight2016
⇒ string
This method removes whitespace from the right end of a string. (ES2016)
Kind: static property of trim-right-x
Returns: string
- The right trimmed string.
Throws:
TypeError
If string is null or undefined or not coercible.
Param | Type | Description |
---|
string | string | The string to trim the right end whitespace from. |
Example
import {trimRight2016} from 'trim-right-x';
console.log(trimRight2016(' \t\na \t\n') === ' \t\na');
trim-right-x
⇒ string
This method removes whitespace from the right end of a string. (ES2018)
Kind: static property of trim-right-x
Returns: string
- The right trimmed string.
Throws:
TypeError
If string is null or undefined or not coercible.
Param | Type | Description |
---|
string | string | The string to trim the right end whitespace from. |
Example
import trimRight from 'trim-right-x';
console.log(trimRight(' \t\na \t\n') === ' \t\na');