VBS中每个字符后加一个space
Add a space after every character in VBS
我想要一个输入框,你输入一个字符串,它会给你一个输出,但每个字符后面都有一个 space(甚至 spaces)。
示例:
"Hello There." → "H e l l o T h e r e ."
我在网上尝试过的所有方法都没有用(我会遇到很多错误)。
你应该添加这个函数Space:Return一个由指定数量的空格组成的字符串。
根据@Lankymart 的评论,您可以在 vbscript 中编写类似的内容:
Option Explicit
Dim Title,Input,i,OutPut
Title = "Add a space after every character in VBS"
Input = InputBox("Hello There.",Title,"Hello There.")
If input <> "" Then
For i = 1 To Len(Input)
OutPut = OutPut & Mid(Input,i,1) & space(1)
Next
End If
MsgBox OutPut,vbInformation,Title
Inputbox "The String " & chr(34)& Input & chr(34) &" is converted to ",Title,OutPut
我想要一个输入框,你输入一个字符串,它会给你一个输出,但每个字符后面都有一个 space(甚至 spaces)。 示例:
"Hello There." → "H e l l o T h e r e ."
我在网上尝试过的所有方法都没有用(我会遇到很多错误)。
你应该添加这个函数Space:Return一个由指定数量的空格组成的字符串。
根据@Lankymart 的评论,您可以在 vbscript 中编写类似的内容:
Option Explicit
Dim Title,Input,i,OutPut
Title = "Add a space after every character in VBS"
Input = InputBox("Hello There.",Title,"Hello There.")
If input <> "" Then
For i = 1 To Len(Input)
OutPut = OutPut & Mid(Input,i,1) & space(1)
Next
End If
MsgBox OutPut,vbInformation,Title
Inputbox "The String " & chr(34)& Input & chr(34) &" is converted to ",Title,OutPut