Skip to main content

Signature

Trait functions

append_word

Appends a single word of len bytes to the end of the ByteArray. This function assumes that:
  1. word could be validly converted to a bytes31 which has no more than len bytes of data.
  2. len ByteArray

Examples

len

Returns the length of the ByteArray.

Signature

Examples

at

Returns an option of the byte at the given index of self or None if the index is out of bounds.

Signature

Examples

rev

Returns a ByteArray with the reverse order of self.

Signature

Examples

append_word_rev

Appends the reverse of the given word to the end of self. This function assumes that:
  1. len < 31
  2. word is validly convertible to bytes31 of length len.

Signature

Examples