# replace

Source: https://taxilang.org/docs/language/stdlib/replace

**Full name:** `taxi.stdlib.replace`

## Signature

```taxi
declare extension function replace(source: String, searchValue:String, replacement: String):String
```

## Description

Replaces all occurrences of `searchValue` in `source` with `replacement`, returning a new string.

```taxi
find { order: Order } as {
   cleanRef: String = order.reference.replace('-', '_')
}
```

## Examples

Replaces all occurrences of a substring with a new value.

Query:

```taxi
find {
   replaced: String = replace('Hello World', 'World', 'Taxi')
}
```

Result:

```json
{
  "replaced": "Hello Taxi"
}
```
