Template:Do/Doc
The UESPWiki – Your source for The Elder Scrolls since 1995
Summary[edit]
This template repeats something an inputted number of times.
Parameters[edit]
Parameter | Scope | Description |
---|---|---|
1 | required | The number of times to "do". Supports numbers up to 255. |
2 | optional | What to repeat (default: 1 ). Note that this template can only produce strings of length up to 500. To increase the repetitions or string length to a combined length over 500, use #replace or #explodeargs as below. |
Usage[edit]
To repeat a character a specified number of times, use this:
{{Do|[#]|[A]}}
[#] |
Number of times to repeat |
[A] |
The character to repeat |
Using:
[#]
as3
[A]
as0
000
To surpass aforementioned limitations, use code that looks like this:
{{#replace:{{Do|[#]}}|1|[A]}}
[#] |
Number of times to repeat |
[A] |
What to repeat |
Using:
[#]
as4
[A]
as[[File:BL-icon-Gold.png|22px]]
To call a template a specified number of times, use code that looks like this:
{{#explodeargs:{{#replace:{{Do|[#]|,}}|,|[A]}}|1|[B]|[C]}}
or, if the template has no parameters or only fixed parameters,
{{#replace:{{Do|[#]}}|1|{{[B]|[A]}}}}
[#] |
Number of times to repeat |
[A] |
What to pass as the unnamed (numbered) parameters into the template, with a comma , appended at the end. For multiple parameters, separate each with a comma , and ensure that the total number of commas is equal to [C] . |
[B] |
What template to call |
[C] |
Number of parameters |
Using:
[#]
as7
[A]
asYes!,
[B]
asTick
[C]
as1