webCOMAND

#RTRIM

Strip whitespace (or other characters) from the end of a string.

Prototype

#RTRIM($string, $characters = " \t\n\r\0\x0B")

Parameters

  • string - The string that will be trimmed.
  • characters - Optional custom characters to strip in the form of a string.

Return

Returns the trimmed string.

Example

#/ Trimmed: [ This is some text.]
#LOCAL($Text, " This is some text.\n")
Trimmed: [#RTRIM($Text)]

#/ Trimmed: [This is some text]
#LOCAL($Text, "This is some text.")
Trimmed: [#RTRIM($Text, ".T")]