Difference between revisions of "Template:Repeat/doc"

From Yugipedia
Jump to: navigation, search
(create documentation)
 
(update documentation)
Line 7: Line 7:
 
{{t|Repeat|text|number}}
 
{{t|Repeat|text|number}}
  
*''text'' is the text or code to be repeated. Due to [[mw:Extension:StringFunctions#$wgStringFunctionsLimitReplace|$wgStringFunctionsLimitReplace]], the maximum string length that can be repeated is 30 characters; in strings with more than 30 characters, the extra characters are ignored:
+
*''text'' is the text or code to be repeated.
{| class="wikitable" style="margin: auto;"
 
! Code !! Result
 
|-
 
| {{t|Repeat|abcdefghijklmnopqrstuvwxyZ|2}} (26 characters) || {{Repeat|abcdefghijklmnopqrstuvwxyZ|2}}
 
|-
 
| {{t|Repeat|abcdefghijklmnopqrstuvwxyZABCDEFGHI|2}} (35 characters) || {{Repeat|abcdefghijklmnopqrstuvwxyZABCDEFGHI|2}}
 
|}
 
  
*''number'' is the number of times to repeat the text or code. The string can only be repeated up to 14 times, after which the output is broken:
+
*''number'' is the number of times to repeat the text or code.
{| class="wikitable" style="margin: auto;"
 
! Code !! Result
 
|-
 
| {{t|Repeat|Whee!|14}} || {{Repeat|Whee!|14}}
 
|-
 
| {{t|Repeat|Whee!|15}} || {{Repeat|Whee!|15}}
 
|}
 
  
 
<includeonly>
 
<includeonly>

Revision as of 06:09, 5 January 2012

{{Repeat}} is used to repeat a given bit of text or code a specified number of times.

Usage

{{Repeat|text|number}}

  • text is the text or code to be repeated.
  • number is the number of times to repeat the text or code.