Skip to content

hexDataSlice

hexDataSlice(data, offset, endOffset?): string

Defined in: utils/bytes.ts:504

Slices a BytesLike to extract a certain part of the input

BytesLikeWithNumber

the data to slice from

number

the index to start extraction at

number

the index to end extraction at

string

the extracted data as a hex string

hexDataSlice([20, 6, 48], 0, 2);
// '0x1406'