FUNCTION

byte_array.sub

pure function sub(start: integer): byte_array

Returns a sub-array of this byte array starting from the specified index (inclusive).

Parameters

  • start — the start index of the sub-array

Throws

  • exception — if the start index is out of range

Since

0.6.0


pure function sub(start: integer, end: integer): byte_array

Returns a sub-array of this byte array from the specified start index (inclusive) to the specified end index (exclusive).

Parameters

  • start — the start index of the sub-array
  • end — the end index of the sub-array

Throws

  • exception — when: - the start or end indexes are out of range - the start index is greater than the end index

Since

0.6.0

© 2026 Chromia