Remove the extra space in the end of the string.