Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I multiply a string in Lua?

Tags:

lua

I wanted to multiply a string and store them into a variable, heres an example of what I wanna do but in Python:

a = "A" * 200
like image 202
Rhyan567 Avatar asked Dec 21 '25 08:12

Rhyan567


1 Answers

You can use the standard function:

a = string.rep("A", 200)
like image 164
TSam Avatar answered Dec 24 '25 10:12

TSam



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!