findFirstNonZeroIndex function

int findFirstNonZeroIndex(
  1. Uint8List bytes
)

Implementation

int findFirstNonZeroIndex(Uint8List bytes) {
  for (int i = 0; i < bytes.length; i++) {
    if (bytes[i] != 0) {
      return i;
    }
  }
  return -1;
}