Text.Trim

From Xojo Documentation

Method

Text.Trim() As Text

Supported for all project types and targets.

Trims whitespace, as defined in the Unicode standard, from the beginning and end of the text. If the value is empty or consists entirely of whitespace, an empty Text is returned.

Sample Code

Removes beginning and ending white space:

Dim t As Text = " Hello, World! "
t = t.Trim ' t = "Hello, World!"