do multiple replace in one go

This commit is contained in:
gutmet 2022-03-27 13:49:47 +02:00
parent 102fc57c2a
commit 8a5f3db23d

View File

@ -20,7 +20,8 @@ func optExit(err error) {
}
func unfold(s string) string {
return strings.ReplaceAll(strings.ReplaceAll(s, "\r\n ", ""), "\r\n\t", "")
replacer := strings.NewReplacer("\r\n ", "", "\r\n\t", "")
return replacer.Replace(s)
}
func vCardValue(line string) string {