Difference between revisions of "Sequence"

From Sega Retro

(bish bash bosh)
(I as thinking like that)
Line 1: Line 1:
<includeonly>{{#vardefine:i|0}}{{#vardefine:{{{1|}}}|$1337}}{{#vardefine:seqout|}}{{#while:
+
<includeonly>{{#vardefine:i|0}}{{#vardefine:{{{1|}}}|test}}{{#while:
 
| {{#ifexpr: {{#len:{{#explode:{{{3}}}|{{{2}}}|{{#var:i}}}}}} > 0 | true }}
 
| {{#ifexpr: {{#len:{{#explode:{{{3}}}|{{{2}}}|{{#var:i}}}}}} > 0 | true }}
| {{#vardefine:r|{{#explode:{{{3}}}|{{{2}}}|{{#var:i}}}}}}{{#vardefine:seqout|{{#var:seqout}}{{#replace:{{{4|}}}|$1337|{{#var:r}}}}}}{{incvar|i}}
+
| {{#vardefine:{{{1|}}}|{{#explode:{{{3}}}|{{{2}}}|{{#var:i}}}}}}{{#replace:{{{4}}}|(REPLACEME)|{{#var:{{{1|}}}}}}}{{incvar|i}}
}}{{#var:seqout}}</includeonly><noinclude>
+
}}</includeonly><noinclude>
 
==Usage==
 
==Usage==
 
<pre>{{sequence|variablename|delimiter|array|
 
<pre>{{sequence|variablename|delimiter|array|
Line 10: Line 10:
 
===Example===
 
===Example===
 
<pre>{{sequence|region|,|jp,us,eu|&#32;
 
<pre>{{sequence|region|,|jp,us,eu|&#32;
* md_date_{{#var:region}}
+
* md_date_(REPLACEME)
 
}}</pre>
 
}}</pre>
  
Line 16: Line 16:
  
 
{{sequence|region|,|jp,us,eu|&#32;
 
{{sequence|region|,|jp,us,eu|&#32;
* md_date_{{#var:region}}
+
* md_date_(REPLACEME)
 
}}
 
}}
  
 
[[Category:Sega Retro templates]]
 
[[Category:Sega Retro templates]]
 
</noinclude>
 
</noinclude>

Revision as of 13:11, 8 February 2018

Usage

{{sequence|variablename|delimiter|array|
block statement
}}

Example

{{sequence|region|,|jp,us,eu| 
* md_date_(REPLACEME)
}}

returns

  • md_date_jp
  • md_date_us
  • md_date_eu