Visual Basic and Visual FoxPro functions to remove spaces


Trim(), LTrim(), RTrim()


Trim(), LTrim(), RTrim(), AllTrim()

Common Syntax Notes

The syntax of the languages appears to be very similar but there is a difference in the behaviour of the Trim() function. In VBA Trim() removes leading and trailing spaces; in Visual FoxPro Trim() removes trailing spaces only and performs the same function as RTrim(). Use AllTrim() in VFP to remove leading and trailing spaces.

SubStrings  |  Text functions  |  Finding characters