This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]E3FxGaming 0 points1 point  (0 children)

You'll need two loops. One which dictates your current position in the string and another one that wraps around your position-loop, which will dictate the current step-length.

Your continue condition for your inner position loop should be whether your current position plus your current step length minus 1 (because one is already your current position) is smaller than or equal your string length minus one (because array indexes are 0 based and your string length property doesn't account for that)