Skip to main content

$trim

The $trim operator removes specified characters from both ends of a string.

Input

  • An array containing exactly two string values: the input string and the set of characters to trim

Output

  • The input string with specified characters removed from both ends

Examples

Trim Whitespace

Result: "Hello, World!"

Trim Specific Characters

Result: "Hello, World!"

Field Value

Result: The input_text field with leading and trailing whitespace removed