10-20-2013, 11:40 PM
The problem lies within this line of your code:
[code2=vbnet]For i = 0 To intMaxNumber Step 4[/code2]
Since intMaxNumber is already the length of the String divided by 4, you are essentially dividing it by four again by stepping by 4 each time. To fix this, you just need to make sure that you are going through the whole string. You can do this by removing the intMaxNumber variable entirely and replacing the logic with something like this:
[code2=vbnet]For i = 0 To s.Length Step 4
strings.Add(s.Substring(i, 4))
Next[/code2]
That should do it!
[code2=vbnet]For i = 0 To intMaxNumber Step 4[/code2]
Since intMaxNumber is already the length of the String divided by 4, you are essentially dividing it by four again by stepping by 4 each time. To fix this, you just need to make sure that you are going through the whole string. You can do this by removing the intMaxNumber variable entirely and replacing the logic with something like this:
[code2=vbnet]For i = 0 To s.Length Step 4
strings.Add(s.Substring(i, 4))
Next[/code2]
That should do it!