Skip to content

STRREPLACE()

Synopsis

Replace instances of a substring within a string with another string.

Description

Searches for all instances of the find-string in provided variable and replaces them with replace-string. If replace-string is an empty string, this will effectively delete that substring. If max-replacements is specified, this function will stop after performing replacements max-replacements times.

Note

The replacement only occurs in the output. The original variable is not altered.

Syntax

STRREPLACE(varname,find-string[,replace-string[,max-replacements]])
Arguments
  • varname

  • find-string

  • replace-string

  • max-replacements

Generated Version

This documentation was generated from Asterisk branch 20 using version GIT