# replace

Description: replace cheatcode documentation

Note: This document was authored using MDX

  Source: https://github.com/NomicFoundation/hardhat-website/tree/main/src/content/docs/docs/reference/cheatcodes/Utilities/replace.mdx

### Signature

```solidity
function replace(
  string calldata input,
  string calldata from,
  string calldata to
) external pure returns (string memory output);
```

### Description

Replaces occurrences of `from` in the given `string` with `to`.
