Nice, but
> trims the stray trailing \r that malformed input likes to leave behind
how does this distinguisg the non-stray variety?