I have a program where a user enters a list of numbers in the form of a string. This list of numbers is always a multiple of 8.
So the list can contain 8, 16, 32, 40, 48, etc. numbers.
I need to split that string into every 8 characters.
For example, say the user entered "1234123445674567"
How can I split it into a string array where (0) is "12341234" and (1) is "45674567"
Note: The size of the array has to be equal to the length of the string divided by 8.
Like this:
Dim stringArray(txtInput.Text.Length/8) as String
Edit: I know I could do this by making a loop that counts 8 numbers and splits it into an array but that would be lengthy and take a few variables and I know there's a more efficient way to do it. I just don't know the syntax.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…