Closed japanoise closed 7 years ago
Actually, not to worry. For anyone interested, the colors are stored in such a way that indexes must be the index of the rune in the string; that is the indexes in a string "…runes"
would be:
0: …
1: r
2: u
3: n
4: e
5: s
...rather than the first couple of indices being the bytes needed to represent '…'.
This is different to what I expected, but workable.
Currently code like the above in my program causes a lot of graphical glitches; i.e. areas of the line getting highlighted the wrong colour. How can I iterate through characters in the string and avoid this? Perhaps as some variation on the range?