---
title: std.replace
summary: null
url: >-
  https://www.fastly.com/documentation/reference/vcl/functions/strings/std-replace
---

```
STRING std.replace(STRING s, STRING target, STRING replacement)
```

**Available in:** all subroutines

Replaces the first occurrence of the literal string `target` in string `s` 
with `replacement`. If `target` is the empty string, the original string `s` 
is returned.

## Example

```vcl
std.replace("abcabc", "b", "") # returns "acabc"
```
