Trim


Function Trim( string )


Returns a copy of string with all leading and trailing whitespace removed.


Syntax a = Trim( " Hello There " )


Remarks

Trim returns a copy of string with all leading and trailing whitespace removed.


See Also:

LTrim RTrim String Functions


Example Script


' Trim leading and trailing whitespace from each line as it is displayed

STRING ln


ln = TRIM(" This ") ' All spaces before and after This will be removed

PRINT ln

ln = ln + TRIM(" is a ") ' All spaces before is and after a will be removed

PRINT ln

ln = ln + TRIM(" test of TRIM. . . . ") ' All spaces before test and after the last . will be removed

PRINT ln



Script Output


This

Thisis a

Thisis atest of TRIM. . . .