VBScript Trim Function

The Trim function removes spaces on both sides of a string."

Example

Example

<%

fname=" Jack "
response.write("Hello" & Trim(fname) & "and welcome.")

%>

The output of the code above will be:

HelloJackand welcome.

❮ Complete VBScript Reference