@ tetrastes
You still don't get it, do you?
Removing chars with
downto does not re-allocate memory for the whole string.
It just performs a move on the string tail. There is no need for reallocmem. It shrinks.
Removing chars with
to, from zero, DOES re-allocate memory for the whole string every time and is therefor considerably slower, calls reallocmem/getmem, move and freemem on every occasion.
So much for the beginners!
There, I gave it away.

Basics, basics, basics.

It was a genuinely good question for beginners and then an old hand falls in the same trap and forces me to reveal the answer.
Shame on you

(at least the beginners now have the explanation)
Otherwise it is my opinion that
to is not buggy. (who invented that novelty?)
Actually that is fact, not opinion, but I was watching a documentary about Carthage, "Ceterum censeo Carthaginem esse delendam,"

.