vbscript Trim

The solution for “vbscript Trim” can be found here. The following code will assist you in solving the problem.

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

name=” Steve ”
response.write(“Hello” & Trim(name) & “and welcome.”)
‘ Output: HelloSteveand welcome.

‘ There are also LTrim and RTrim for right or left removal of spaces.

response.write(“Hello” & LTrim(fname) & “and welcome.
“)
response.write(“Hello” & RTrim(fname) & “and welcome.”)
‘ Output: HelloSteve and welcome.
‘ Hello Steveand welcome.

Thank you for using DeclareCode; We hope you were able to resolve the issue.

More questions on [categories-list]

Similar Posts