how split string
Create a function to convert a string to equal length (20 Characters) string by adding blank space at the end of the string.
Eg: strn = "dfsgjfhdgjkhsfdjkghsklfhgklsjdfhgjkshdfhgafhgkhfgafjhgjfhgkjhfgjhfhgfkghgkfghkh"
i want the out put string is : 20charters space 20charters 20charters space 20charters space
any one help pkzz
Eg: strn = "dfsgjfhdgjkhsfdjkghsklfhgklsjdfhgjkshdfhgafhgkhfgafjhgjfhgkjhfgjhfhgfkghgkfghkh"
i want the out put string is : 20charters space 20charters 20charters space 20charters space
any one help pkzz
0 Comments
[ + ] Show comments
Answers (1)
Please log in to answer
Posted by:
captain_planet
13 years ago
Not perfect, but it's a start.....
Dim mystring : mystring = "kdjflgkeodisuehtnfj1kdlfkeiruthgndmsndh2jrutigonsnauasisand3aiondansdhmisa"
Dim newstring : newstring = ""
For i = 1 to Len(mystring)
If i Mod 20 = 0 Then
newstring = newstring & mid(mystring,(i-19),20) & " "
End If
Next
newstring = Trim(newstring)
wscript.echo newstring
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.