trim
-
function
-
new in 1.54
-
The
trim
function trims both leading and trailing whitespace (or other characters) from a text value. This function takes one or two parameters. The first parameter is the source text value to be trimmed. The second (optional) parameter is a text string defining the set of characters that will be removed from the source text. If the second parameter is not given, whitespace and newline characters will be trimmed by default. -
Examples: +
put trim(" my words ") -- "my words"
put trim(" my words ", "ms ") -- "y word"
-
Related: trimAll, trimEnd, trimStart