<trim_characters> from both sides of the source string <expression>. If no <trim_characters> parameter is specified, the longest string containing only whitespace characters (ASCII Decimal 32) is removed from both sides of the specified source string <expression>.
Syntax
Parameters
| Parameter | Description | Supported input types |
|---|---|---|
<expression> | An expression that returns the string to be trimmed. | TEXT |
<trim_characters> | Optional. An expression that returns characters to trim from both sides of the <expression> string. If omitted, whitespace (ASCII Decimal 32) is trimmed. | TEXT |
Return Type
TEXT
Examples
The following example trims the characterx from both sides of a string:
| result (TEXT) |
|---|
| ‘The Acceleration Cup’ |
x and y from both sides of a string. Note that the ordering of characters in <trim_characters> is irrelevant:
| result (TEXT) |
|---|
| ‘The Acceleration Cup’ |
<trim_characters> parameter, and thus trims whitespace from both sides of a string:
| result (TEXT) |
|---|
| ‘The Acceleration Cup’ |