Template:Do

The UESPWiki – Your source for The Elder Scrolls since 1995
Jump to: navigation, search

Summary[edit]

This template repeats something an inputted number of times.

Parameters[edit]

Do
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:

  • [#] as 3
  • [A] as 0

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:

  • [#] as 4
  • [A] as [[File:BL-icon-Gold.png|22px]]


BL-icon-Gold.pngBL-icon-Gold.pngBL-icon-Gold.pngBL-icon-Gold.png


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:

  • [#] as 7
  • [A] as Yes!,
  • [B] as Tick
  • [C] as 1



Yes!☑Yes!☑Yes!☑Yes!☑Yes!☑Yes!☑Yes!☑