1) The workaround in the page you linked is unecessarily complicated/slow. Here's a better one:
var %checktext = $gettok(%checktext,1-,32)
Alternatively, you can do a
//tokenize 32 %checktext and have $1- filled with the text stripped of multiple spaces.