I have a program in which the user enters a list of numbers as a string. This list of numbers is always a multiple of 8.
Thus, the list may contain the numbers 8, 16, 32, 40, 48, etc.
I need to split this line for every 8 characters.
For example, let's say the user entered "1234123445674567"
How can I split it into an array of strings, where (0) is "12341234" and (1) is "45674567"
Note: The size of the array must 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 can do this by creating a loop that counts 8 numbers and splits it into an array, but it will be long and take several variables, and I know that there is a more efficient way to do this. I just don't know the syntax.
Mark kramer
source share