113. What Is L-trim Function Will Do?
Date Posted: 06/27/2012
Ans: Returns a copy of a string without leading spaces (LTrim),
Trailing spaces (RTrim), or both leading and trailing
Spaces (Trim).
LTrim (string)
RTrim (string)
Trim (string)
The string argument is any valid string expression. If
String contains Null, Null is returned.
Remarks
The following example uses the LTrim, RTrim, and Trim
Functions to trim leading spaces, trailing spaces, and both
Leading and trailing spaces, respectively:
Dim MyVar
MyVar = LTrim (" vbscript ") ' MyVar
Contains "vbscript ".
MyVar = RTrim (" vbscript ") ' MyVar contains”
Vbscript".
MyVar = Trim (" vbscript ") ' MyVar contains "vbscript".
|