Trim \r\n from input.