Use stdlib Repeat function

This commit is contained in:
2026-03-16 00:07:31 +01:00
parent 083ff01e53
commit c9cc104fe5

View File

@@ -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)
}