Tuesday, August 17, 2010

Visual Basic String Function : Trim

Purpose : Trim removes leading and trailing spaces from a string or byte array.

Syntax :
Trim ( string )

string : The string being trimmed

ds!Name = Trim ( txtName.text )

Trim serves as combination of the LTrim and RTrim function; it removes all spaces from a string or byte array. Trim generally is used with data entered on a form to make sure no extraneous spaces are stored with the data.

No comments:

Post a Comment