From 8a5f3db23d889998817e83eb99c8a9c2afb00383 Mon Sep 17 00:00:00 2001 From: gutmet Date: Sun, 27 Mar 2022 13:49:47 +0200 Subject: [PATCH] do multiple replace in one go --- vcf2fritzbox.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vcf2fritzbox.go b/vcf2fritzbox.go index 49a897c..6454eb5 100644 --- a/vcf2fritzbox.go +++ b/vcf2fritzbox.go @@ -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 {