Explanation of string.rep?

I’ve been seeing a lot of people using string.rep, I tried looking at the definition given by Roblox, but I wasn’t able to understand it. If anybody could explain it to me (and maybe give an example of when or why I’d use it), it would be very appreciated.

It just repeats a string for a given amount of times.

print(string.rep("yes", 10)) -- yesyesyesyesyesyesyesyesyesyes
6 Likes