bytes.get

bytes.get

bytes.get

Function

Read the byte at the specified index.

Syntax

Parameters

ParametersTypeRequiredDefault valueDescription
indexIntYesNoneThe byte index. Supports reading negative numbers from the tail.

Return value

TypeDescription
Int/EmptyReturns an integer from 0 to 255 when the subscript exists; returns empty when the subscript is out of bounds.

Code Example

Notes

  • data[0] can also read bytes; out of bounds also returns empty.