Skip to main content

trim (Function)

Returns a copy of the input string without the leading and trailing whitespace (if any).

Syntax

<STRING> str:trim(<STRING> input.string)

Query Parameters

NameDescriptionDefault ValuePossible Data TypesOptionalDynamic
input.stringThe input string that needs to be trimmed.STRINGNoYes

Example 1

trim("  AbCDefghiJ KLMN  ")

This returns a copy of the input.string with the leading and/or trailing white-spaces omitted. In this scenario, the output is "AbCDefghiJ KLMN".