Jump to content

Template talk:Repeat

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

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]