Skip to content

TRIMRIGHT

Removes all leading whitespace or any characters you specify from the end of the input string.

js
TRIMRIGHT(input_string, characters_to_trim)

Parameters

  • input_string - The string to be trimmed.
  • characters_to_trim - Characters to remove from the end of the string. Defaults to whitespace. (optional)

Examples

js
TRIMRIGHT(" Hello World  ')

Result: Hello World

js
TRIMRIGHT("--Foo-Bar--", "-")

Result: --Foo-Bar