From c9cc104fe5eed74b91a3c7580d32af4f2bc713e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krejczinger=20=C3=81rp=C3=A1d?= Date: Mon, 16 Mar 2026 00:07:31 +0100 Subject: [PATCH] Use stdlib Repeat function --- iteration/iteration.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/iteration/iteration.go b/iteration/iteration.go index 2de2a2d..35a5cc9 100644 --- a/iteration/iteration.go +++ b/iteration/iteration.go @@ -12,10 +12,6 @@ func Repeat(character string, count int) string { if count == 0 { count = defaultRepeatCount } - var repeated strings.Builder - for range count { - repeated.WriteString(character) - } - return repeated.String() + return strings.Repeat(character, count) }