Use String#trim() instead of String#replace()