I take it the \b is a space?

Code:
alias tohex { 
  var %hex, %i = 1, %1 = $replace($1,\b,$chr(32))
  if (% $+ #* iswm %1) { %1 = $mid(%1,2) }
  while ($mid(%1,%i,1) != $null) {
    %hex = %hex $+ $base($asc($ifmatch),10,16)
    inc %i
  }
  return $eval(%#,0) $+ %hex
}