---
name: "function::str_replace"
section: "3stap"
platform: "linux"
package: "systemtap-doc"
version: "5.1-5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/function::str_replace"
---

# function::str\_replace(3stap)

str\_replace Replaces all instances of a substring with another

## NAME

function::str\_replace - str\_replace Replaces all instances of a substring with another

## SYNOPSIS

```
    str_replace:string(prnt_str:string,srch_str:string,rplc_str:string)
```

## ARGUMENTS

*prnt\_str*

the string to search and replace in

*srch\_str*

the substring which is used to search in *prnt\_str* string

*rplc\_str*

the substring which is used to replace *srch\_str*

## DESCRIPTION

This function returns the given string with substrings replaced.
