You have been redirected from an outdated version of the article. Below is the content available on this topic. To view the old article click here.

trim()

Usage

trim(object)

Description
Removes any leading or trailing whitespace from the given object. If the object is a string, a trimmed version will be returned. If it is a collection, a collection of trimmed strings will be returned.

Example

${trim('         A text with lots of whitespace                                                   ')}
${trim(merge('     A text with lots of whitespace                  ', '     Another text with lots of whitespace               '))}

results in

A text with lots of whitespace
[A text with lots of whitespace, Another text with lots of whitespace]

Search results for "trim()"

trim()

Removes any leading or trailing whitespace from the given object. If the object is a string, a trimmed version will be returned. If it is a collection, a collection of trimmed strings will be returned.

trim(object)