starString method

  1. @useResult
Parser<String> starString([
  1. String? message
])

Returns a parser that accepts the receiver zero or more times. The resulting parser returns the consumed input string.

This implementation is equivalent to PossessiveRepeatingParserExtension.star, but particularly performant when used on character parsers. Instead of a List it returns the parsed sub-String.

For example, the parser letter().starString() accepts the empty string or any sequence of letters and returns a possibly empty string of the parsed letters.

Implementation

@useResult
Parser<String> starString([String? message]) =>
    repeatString(0, unbounded, message);