Attributes
- Companion
- object
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
Members list
Value members
Concrete methods
Concatenates two ByteStrings and returns a new ByteString
Concatenates two ByteStrings and returns a new ByteString
Attributes
Checks if one 'ByteString' is less than another
Checks if one 'ByteString' is less than another
Attributes
Checks if one 'ByteString' is less than or equal to another
Checks if one 'ByteString' is less than or equal to another
Attributes
Checks if one 'ByteString' is greater than another
Checks if one 'ByteString' is greater than another
Attributes
Checks if one 'ByteString' is greater than or equal to another
Checks if one 'ByteString' is greater than or equal to another
Attributes
Gets byte by index
Gets byte by index
Offchain operation, not available onchain. Use ByteString.at for onchain access.
Attributes
Returns the byte at the specified index in the ByteString
Returns the byte at the specified index in the ByteString
Attributes
- Throws
-
BuiltinException
if the index is out of bounds (offchain)
Concatenates two ByteStrings and returns a new ByteString
Concatenates two ByteStrings and returns a new ByteString
Offchain operation, not available onchain.
Attributes
Drops the first n
bytes from the ByteString
Drops the first n
bytes from the ByteString
Value parameters
- n
-
the number of bytes to drop
Attributes
- Example
-
hex"1234567890abcdef".drop(0) // returns hex"1234567890abcdef" hex"1234567890abcdef".drop(4) // returns hex"90abcdef" hex"1234567890abcdef".drop(20) // returns hex"" hex"".drop(20) // returns hex""
Compares two ByteStrings for equality
Compares two ByteStrings for equality
Offchain operation, not available onchain. Use ==
for onchain equality checks.
Attributes
- Definition Classes
-
Any
Calculates a hash code value for the object.
Calculates a hash code value for the object.
The default hashing algorithm is platform dependent.
Note that it is allowed for two objects to have identical hash codes (o1.hashCode.equals(o2.hashCode)
) yet not be equal (o1.equals(o2)
returns false
). A degenerate implementation could always return 0
. However, it is required that if two objects are equal (o1.equals(o2)
returns true
) that they have identical hash codes (o1.hashCode.equals(o2.hashCode)
). Therefore, when overriding this method, be sure to verify that the behavior is consistent with the equals
method.
Attributes
- Returns
-
the hash code value for this object.
- Definition Classes
-
Any
Checks if the ByteString is empty
Checks if the ByteString is empty
Offchain operation, not available onchain.
Attributes
Returns the length of the ByteString
Returns the length of the ByteString
Attributes
The length of the ByteString
The length of the ByteString
Offchain operation, not available onchain.
Attributes
Returns a new ByteString that is a slice of the original ByteString
Returns a new ByteString that is a slice of the original ByteString
Value parameters
- from
-
the starting index of the slice (inclusive)
- len
-
the length of the slice
Attributes
- Example
-
hex"1234567890abcdef".slice(2, 4) // returns hex"567890ab" hex"1234567890abcdef".slice(5, 4) // returns hex"abcdef" hex"1234567890abcdef".slice(9, 4) // returns hex"" hex"1234567890abcdef".slice(0, 0) // returns hex""
Takes the first n
bytes from the ByteString
Takes the first n
bytes from the ByteString
Value parameters
- n
-
the number of bytes to take
Attributes
- Example
-
hex"1234567890abcdef".take(0) // returns hex"" hex"1234567890abcdef".take(4) // returns hex"12345678" hex"1234567890abcdef".take(20) // returns hex"1234567890abcdef" hex"".take(20) // returns hex""
Converts the ByteString to a binary string representation
Converts the ByteString to a binary string representation
Offchain operation, not available onchain.
Attributes
Returns a string representation of the object.
Returns a string representation of the object.
The default representation is platform dependent.
Attributes
- Returns
-
a string representation of the object.
- Definition Classes
-
Any