operator [] method

int operator [](
  1. int index
)

Return the value of bytes at the given index.

The returned value will be in the range 0 to 255.

Implementation

int operator [](int index) {
  IndexError.check(index, length, indexable: this);
  return bytes.cast<Uint8>()[index];
}