webCOMAND

#TRIM

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

Prototype

#TRIM($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: [#TRIM($Text)]

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