Trim
The Trim function removes whitespace characters from the
left and right side of a string. Whitespace includes all non-printable
characters with the exception of carriage
return characters (vbCr and vbCrLf.)
Dim sText sText = " Surrounded by Whitespace "
' write the string with whitespace
Response.Write "*" & sText & "*"
' write the string without whitespace
Response.Write "*" & Trim(sText) & "*"
You may also use the LTrim and RTrim functions to only
trim whitespace from the left or right side respectively.
|
 |

|