trim string convenience method