Replaces string. Works the same as any other programming language replace function Also is htmlSafe, so you can do replaces with html code as well.

Usage:

{{replace-str 'Hello Illinois' 'Illinois' 'World'}} <!-- returns 'Hello World'-->

Parameters:

  • haystack - the string which will have data replaced from it
  • needle - the string which you are planning to replace from the haystack string
  • replace - the string that will be replacing the needle within the haystack string
Show: