mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-07 20:30:36 -05:00
183e862607
Updates for #7602
720 B
720 B
title | description | godocref | date | publishdate | lastmod | categories | menu | keywords | signature | workson | hugoversion | relatedfuncs | deprecated | aliases | |||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
replace | Replaces all occurrences of the search string with the replacement string. | 2017-02-01 | 2017-02-01 | 2020-09-07 |
|
|
|
false |
Replace returns a copy of INPUT
with all occurrences of OLD
replaced with NEW
.
The number of replacements can be limited with an optional LIMIT
parameter.
`{{ replace "Batman and Robin" "Robin" "Catwoman" }}`
→ "Batman and Catwoman"
{{ replace "aabbaabb" "a" "z" 2 }} → "zzbbaabb"