matchChar method

  1. @override
bool matchChar(
  1. int char,
  2. int offset
)
override

Reads the character at the specified offset and returns the result of the comparison with char.

If the specified offset is outside the valid range, it returns false.

The offset must be specified in units defined by the specific reader.

Implementation

@override
bool matchChar(int char, int offset) {
  if (offset < length) {
    final c = _read(offset);
    if (c == char) {
      return true;
    }
  }

  return false;
}