markjoe Posted October 1, 2007 Share Posted October 1, 2007 Anybody know how to split a string into an array of charters in VBScript? As in: "string" -> [0]="s", [1]="t",[2]="r", etc... I used split(text,"",-1,1), but it did not work. Or, does anybody know a good site/forum dealing in VBS? I am really having a hard time finding good documentation on VBS. Quote Link to comment https://forums.phpfreaks.com/topic/71439-solved-vbs-split-string-into-array-of-characters/ Share on other sites More sharing options...
markjoe Posted October 1, 2007 Author Share Posted October 1, 2007 Nevermind, I found it. VBS has no way of doing this. Here is the solution I found (credit goes to unknown poster). x=Len(text) Execute "Dim textarray(" & x & ")" for i=0 to x textarray(i)=Mid(text,i+1,1) Next Quote Link to comment https://forums.phpfreaks.com/topic/71439-solved-vbs-split-string-into-array-of-characters/#findComment-359655 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.