Remove blanks in the head and tail of a string