How to determine a character class

I suspect that for a tiny case like that, it’s actually most efficient (and clearest) to just use a plain old comparison:

(c == '\n' || c == '\r')
1 Like