Function: trimEnd()
trimEnd(
str):string
Defined in: string/sanitize/index.ts:212
Trims whitespace from the end of a string.
Parameters
str
string
The string to trim
Returns
string
The string with trailing whitespace removed
Example
trimEnd(' hello ')
// => ' hello'
trimEnd('test\n\t ')
// => 'test'
See
- trim - trim both ends
- trimStart - trim leading whitespace