I’m doing the way I learned, that is:
with a FOR and taking the Index array one by one, but it is leaving too slow, would otherwise convert it to a String? that leaves quicker?
In my case it would be a Dynamic Array of ShortInt.
For example, given this input:
[0,20,-15]
I would like the following output:
0,20,-15
I suspect that your code is slow because it is performing unnecessary reallocations of the string. However, without seeing your code it’s hard to be sure.
Probably the simplest way to code your algorithm is to use
TStringBuilder. Whether or not that gives sufficient performance, only you can say.