Template talk:Repeat

Latest comment: 6 years ago by Primefac in topic Lua-based replacement

Lua-based replacement

edit

I've written Module:RepeatString (in Lua) to replace the core of this template. Using the examples from the template documentation:

:{{code|{{#invoke:RepeatString|RepeatString|ab|23}}}}
:: produces: {{#invoke:RepeatString|RepeatString|ab|23}}
:{{code|{{#invoke:RepeatString|RepeatString| ab|23}}}}
:: produces: {{#invoke:RepeatString|RepeatString| ab|23}}

To be completely honest, I don't understand the third example in the template at all, so I'll leave making it compatible with that to somebody else.

P.S. It's my first Lua module, so I have no expectation of it being perfect....  — Scott talk 16:45, 3 April 2013 (UTC)Reply

:{{code|{{#expr:{{repeat|ln(10*|20}}1{{repeat|)/ln2|20}}}}}}
::{{#expr:{{repeat|ln(10*|20}}1{{repeat|)/ln2|20}}}}
:{{code|{{#expr:{{#invoke:RepeatString|RepeatString|ln(10*|20}}1{{#invoke:RepeatString|RepeatString|)/ln2|20}}}}}}
::{{#expr:{{#invoke:RepeatString|RepeatString|ln(10*|20}}1{{#invoke:RepeatString|RepeatString|)/ln2|20}}}}

--Sudo77 17:08, 5 April 2013 (UTC)Reply