What about "embedded blanks"?
If your "string" is " HI THERE! ",
The INSPECT LEADING, REVERSE, INSPECT LEADING will get you both leading and trailing blanks without counting the embedded blanks. If doing it "manually" you need is "switch" which is turned off at the first non-blank and turned on again at the next blank.