Buffer
library Buffer
Reference
Functions
append
function append(buffer buf, bytes data) internal pure returns (buffer)
Appends a byte array to the end of the buffer. Resizes if doing so would exceed the capacity of the buffer.
- Parameters:
buf
- The buffer to append to.data
- The data to append.- Returns:
- The original buffer.
append
function append(buffer buf, uint8 data) internal pure
Appends a byte to the end of the buffer. Resizes if doing so would exceed the capacity of the buffer.
- Parameters:
buf
- The buffer to append to.data
- The data to append.- Returns:
- The original buffer.
appendInt
function appendInt(buffer buf, uint data, uint len) internal pure returns (buffer)
Appends a byte to the end of the buffer. Resizes if doing so would exceed the capacity of the buffer.
- Parameters:
buf
- The buffer to append to.data
- The data to append.len
- uint- Returns:
- The original buffer.
init
function init(buffer buf, uint _capacity) internal pure
- Parameters:
buf
- buffer_capacity
- uint