Remove the blank line SubString at the end of the string