Module:Coin
Jump to navigation
Jump to search
Documentation for this module may be created at Module:Coin/doc
local p = {}
function p.repeatString(frame)
-- Get the arguments from the template call
local args = frame.args
local stringToRepeat = args[1]
local numRepetitions = tonumber(args[2])
-- Create an empty string to store the repeated string
local repeatedString = ""
-- Repeat the string and append it to the repeatedString variable
for i = 1, numRepetitions do
repeatedString = repeatedString .. stringToRepeat
end
-- Return the repeated string
return repeatedString
end
return p