📜  vbscript Trim - VBA 代码示例

📅  最后修改于: 2022-03-11 14:51:54.548000             🧑  作者: Mango

代码示例1
' 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.