trimLeadingZero static method

List<int> trimLeadingZero(
  1. List<int> bytes
)

Implementation

static List<int> trimLeadingZero(List<int> bytes) {
  int offset = 0;
  // List<int> data = bytes;
  while (offset < bytes.length) {
    if (bytes[offset] != 0) break;
    offset++;
  }
  return bytes.sublist(offset);
}