startsWith method
Check whether the input data starts at the specified position index with
the specified value string and and returns true if the check is
successful.
The start must be specified in units defined by the specific reader.
Implementation
@override
bool startsWith(String string, int index) {
var readDataSize = 0;
final iterator = string.runes.iterator;
while (iterator.moveNext()) {
final c1 = iterator.current;
final c2 = _read(index);
if (c1 != c2) {
return false;
}
index += _readDataSize;
readDataSize += _readDataSize;
}
_lastIndex = -1;
_readDataSize = readDataSize;
return true;
}