predicate function
Returns a parser that reads input of the specified length
, accepts
it if the predicate
matches, or fails with the given message
.
Implementation
@useResult
Parser<String> predicate(
int length,
Predicate<String> predicate,
String message,
) => PredicateParser(length, predicate, message);