It's nice how %text = $mid($1-,%i,1) $+ %text works for $chr(32) (blank)!
I used:
%text = %text $+ $mid( %input , $calc( $len( %input ) - %i ) , 1 )
which quite naturally didn't work for blanks. (I had them replaced with $chr(160) then replaced back to $chr(32) before returned)

Cool