rle(S) = RLE => RLE = "", Char = S[1], I = 2, Count = 1, while (I <= S.len) if Char == S[I] then Count := Count + 1 else RLE := RLE ++ Count.to_string() ++ Char.to_string(), Count := 1, Char := S[I] end, I := I + 1 end, RLE := RLE ++ Count.to_string() ++ Char.to_string().