ReplaceAll efficiently replaces placeholders in input with their values. All placeholders are replaced in the output whether they are recognized or not. Values that are empty string will be substituted with empty.
(input, empty string)
| 161 | // whether they are recognized or not. Values that are empty |
| 162 | // string will be substituted with empty. |
| 163 | func (r *Replacer) ReplaceAll(input, empty string) string { |
| 164 | out, _ := r.replace(input, empty, true, false, false, nil) |
| 165 | return out |
| 166 | } |
| 167 | |
| 168 | // ReplaceFunc is the same as ReplaceAll, but calls f for every |
| 169 | // replacement to be made, in case f wants to change or inspect |