Test string trimming