skipToNextStart method

List<int> skipToNextStart(
  1. int start,
  2. List<int> buffer
)

Implementation

List<int> skipToNextStart(int start, List<int> buffer) {
  int index = start;
  for (; index < (buffer.length - 1); index++) {
    if (_isMessageStart(buffer, index)) break;
  }
  if (index == (buffer.length - 1)) return [];
  return buffer.sublist(index, buffer.length - index);
}