Trim Function

Action

Strips leading and trailing whitespace from a string.

Syntax

sStripped = Trim (sToStrip)
Variable Description
sStripped The stripped string. STRING.
sToStrip The string to strip. STRING.

Notes

Trim removes leading and trailing whitespace from a string and returns the rest of the string. If sToStrip is an empty string ("") or contains only whitespace, Trim returns an empty string.

Trim removes leading and trailing whitepace characters as determined by IsSpace from a specified string.

Whitespace characters are spaces, horizontal tabs, vertical tabs, carriage returns, linefeeds, and formfeeds.

Example

STRING s = " Has whitespace "
Print( ">{Trim(s)}<") // prints: >Has whitespace<