trim

Use the trim function to remove leading and trailing whitespace.

 trim ( text )

This function returns a value of type TEXT.

The function has one parameter:

  • text, type TEXT. The text that is to be trimmed.

Input is always converted to Unicode Normalization Form C (NFC). Tabs, paragraph breaks, and line breaks are handled as characters. Other word processor content, such as layout switches and graphical objects, is stripped and not included in the result.

All tabs, spaces, paragraph breaks, and line breaks are removed from the beginning and end of text.

Example

 trim (" example ")
Results in "example"