I've explained this earlier:
If your string is 100 characters long, and you start from 3 to 100, by the time you reach 100th character, the string will be around 130 characters long, because you are adding spaces after every 3rd character. So the loop will stop at 100 and the remaining portion (30 last characters) of the string will not be processed.
If you run your loop in reverse, you avoid this issue.
.
Another option would be using a While loop, it will run until the full string is processed, even if it grows or shrinks:
Local variable i=0
While i<len(s)
.....(process the string)
.....Add 1 to i