Add isNext(char) and isNext(Predicate<Character>) methods to ImmutableStringReader and StringReader
I see myself and other people use reader.canRead() && reader.peek() == c (or !reader.canRead() || reader.peek() != c) all the time. This is very tedious to do, so this adds the isAt(char) method to the ImmutableStringReader interface and StringReader class.
I feel like isAt isn't the best name for this (at makes me think of an index, not a character); maybe nextIs or something like that would be better?
Ah yeah, maybe something like isNext to be more consistent with the other method names like canRead? (It also reads a bit better imo)
Changed the method name to isNext. I was also thinking of adding an isNext method that accepts a Predicate<Character> as a parameter to be able to check for more than one character. For example canRead() && Character.isWhitespace(peek()) in the skipWhitespace method would become isNext(Character::isWhitespace).
Closing and reopening to rerun checks.