Perhaps TrimEnd would be better here? Also, no need to declare another variable, just do it inline