Deviopath › Go

Repeat a String

Easy · Strings

strings.Repeat(s, n) concatenates s with itself n times. Repeating zero times gives "".

Write Repeat(s, n) that returns s repeated n times. If n is 0 or negative, return "".

Next: Count Vowels