This ends up being a little slower than how it is now, probably because the more common case is for `char` to be in the set of standard characters. I'll add a comment explaining why it's written this way.