ReplaceFunc is the same as ReplaceAll, but calls f for every replacement to be made, in case f wants to change or inspect the replacement.
(input string, f ReplacementFunc)
| 169 | // replacement to be made, in case f wants to change or inspect |
| 170 | // the replacement. |
| 171 | func (r *Replacer) ReplaceFunc(input string, f ReplacementFunc) (string, error) { |
| 172 | return r.replace(input, "", true, false, false, f) |
| 173 | } |
| 174 | |
| 175 | func (r *Replacer) replace(input, empty string, |
| 176 | treatUnknownAsEmpty, errOnEmpty, errOnUnknown bool, |
no test coverage detected