TextBuffer buf = new TextBuffer(); ; buf.setText(' I do '); buf.replace(' +', ' '); info(strFmt("'%1'", strLRTrim(buf.getText())));