trim output from toString