Repeat a string: Difference between revisions

m
Line 807:
 
=={{header|Lua}}==
<lang lua>function repeats(s, n) return n > 0 and s .. repeatrepeats(s, n-1) or "" end</lang>
 
Or use native string library function