feat: add length and concat to aiken/bytearray
This commit is contained in:
parent
b7edb7e584
commit
9f374d9431
|
@ -1,5 +1,13 @@
|
|||
use aiken/builtins
|
||||
use aiken/builtin
|
||||
|
||||
pub fn slice(bytes: ByteArray, start: Int, end: Int) -> ByteArray {
|
||||
builtins.sliceByteString(start, end, bytes)
|
||||
builtin.sliceByteArray(start, end, bytes)
|
||||
}
|
||||
|
||||
pub fn length(bytes: ByteArray) -> Int {
|
||||
builtin.lengthOfByteArray(bytes)
|
||||
}
|
||||
|
||||
pub fn concat(left front: ByteArray, right back: ByteArray) -> ByteArray {
|
||||
builtin.appendByteArray(front, back)
|
||||
}
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
pub fn spend() -> Bool {
|
||||
True
|
||||
}
|
||||
pub fn spend(d: Nil, r: Nil, ctx: Nil) -> Bool {
|
||||
True
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue