u can add to the variable more then one space at once and it will store one space at the end in the variable
for example:
//var %x = a $+ $str($chr(32),2) | var %x = %x $+ b | echo -a %x
will work fine