LibBytes
This library helps manipulating bytes.
Functions
slice
Slices the provided bytes.
function slice(bytes memory bytes_, uint256 start, uint256 length) internal pure returns (bytes memory);
Parameters
| Name | Type | Description |
|---|---|---|
bytes_ | bytes | Bytes to slice |
start | uint256 | The starting index of the slice |
length | uint256 | The length of the slice |
Returns
| Name | Type | Description |
|---|---|---|
<none> | bytes | The slice of _bytes starting at _start of length _length |
Errors
SliceOverflow
The length overflows an uint.
error SliceOverflow();
SliceOutOfBounds
The slice is outside of the initial bytes bounds.
error SliceOutOfBounds();