diff --git a/langext/string.go b/langext/string.go index 53a9417..d119c56 100644 --- a/langext/string.go +++ b/langext/string.go @@ -107,3 +107,11 @@ func NumToStringOpt[V IntConstraint](v *V, fallback string) string { return fmt.Sprintf("%d", v) } } + +func StrRepeat(val string, count int) string { + r := "" + for i := 0; i < count; i++ { + r += val + } + return r +}