Skip to main content

trimEnd

Removes the given substring from a string's end.

trimEnd(str, substring)

Parameters#

  • str: Target string
  • substring: string that needs to be removed from the end of str

Returns#

  • modified string