Trim$ Function

Returns a string equal to specified string without leading or trailing single-byte spaces.

Syntax
Trim$(string)

Parameters

string
Specify a string expression.

Return Values
If the specified string contains leading and/or trailing single-byte spaces, the spaces will be deleted.

See Also
LTrim$ Function, RTrim$ Function

Trim$ Function Example

str$ = "  data  "
str$ = Trim$(str$)  ' str$ = "data"