# BytesLib

### Functions[​](https://docs.uniswap.org/contracts/v3/reference/periphery/libraries/BytesLib#functions) <a href="#functions" id="functions"></a>

#### slice[​](https://docs.uniswap.org/contracts/v3/reference/periphery/libraries/BytesLib#slice) <a href="#slice" id="slice"></a>

```solidity
  function slice(
  ) internal returns (bytes)
```

#### toAddress[​](https://docs.uniswap.org/contracts/v3/reference/periphery/libraries/BytesLib#toaddress) <a href="#toaddress" id="toaddress"></a>

```solidity
  function toAddress(
  ) internal returns (address)
```

#### toUint24[​](https://docs.uniswap.org/contracts/v3/reference/periphery/libraries/BytesLib#touint24) <a href="#touint24" id="touint24"></a>

```solidity
  function toUint24(
  ) internal returns (uint24)

```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.dragonswap.app/dragonswap/resources/developer-resources/smart-contracts/dragonswapv2/periphery/libraries/byteslib.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
