This is slightly clearer as `if ch != "\r"`