trimEnd

String
since 4.0.0

Arguments

  • string The string to trim.
  • string The characters to trim.

Returns

string the trimmed string.

Removes trailing whitespace or specified characters from string.

Example of Lodash _.trimEnd

_.trimEnd('  abc  ');
// => '  abc'

_.trimEnd('-_-abc-_-', '_-');
// => '-_-abc'