SQUEEZE

r = SQUEEZE (s)

Removes all leading, trailing and duplicated white-space from string s.

Example:

s = " Hi  there "
print "["; s ; "]"
print "["; SQUEEZE(s); "]"

'Output:
' [ Hi there ]
' [Hi there]