position property

int get position

The current position of the scanner in the string, in characters.

Implementation

int get position => _position;
set position (int position)

Implementation

set position(int position) {
  if (position.isNegative || position > string.length) {
    throw ArgumentError('Invalid position $position');
  }

  _position = position;
  _lastMatch = null;
}