//bset -t &i 1 hello | var %test = $+(test,$chr(32),$chr(32),&i,$lf,ok) | echo -a $bvar($glue(%test),1-)
Returns: 116 101 115 116 32 32 104 101 108 108 111 32 111 107 32
alias glue {
var %string = $+($replace($1,$chr(32),$lf),$lf)
while ($pos(%string,$lf)) {
var %length = $v1, %variable = $mid($mid(%string,1,$v1),1,-1), %string = $mid(%string,$calc($v1 + 1))
if ($bvar(%variable,0)) {
bcopy -c &glue $calc($bvar(&glue,0) + 1) %variable 1 -1
}
elseif (%length > 1) {
bset -t &glue $calc($bvar(&glue,0) + 1) %variable
}
bset &glue $calc($bvar(&glue,0) + 1) 32
}
return &glue
}