> The question was more centered around what the procedure of runeAt is for
That is impossible to guess from the subject of your message and from its text.
I am not sure for what runeAt() is intended, but from its documentation
Returns the rune in s at byte index i
Run
and the fact that runes in unicode strings may occupy more than one single byte
it is clear that when used in a loop of byte indices it will give the same rune
multiple times.
