int SkipColorCodeAt(str s, int i)
Skips one colorcode at position i
and returns the first index after the skipped colorcode. If there is no colorcode at i
, returns i
.
This is how StripColorCodes is implemented:
function str StripColorCodes(str s) { str result = ""; for (int i = 0; i < StrLen(s); i++) { i = SkipColorCodeAt(s, i); result = StrParam(s:result, c:GetChar(s, i)); } return result; }