Toggle menu
15
236
70
27.5K
Kenshi Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Module:Params/testcases/tcompare separated entries/doc: Difference between revisions

From Kenshi Wiki
Created page with "This test template compares the behaviours of Module:Params with that of Module:Separated entries. == Usage == For instance, <syntaxhighlight lang="wikitext">{{ module:params/testcases/tcompare separated entries | one | two | three | foo | bar | Jupiter | hello = world }}</syntaxhighlight> generates {{ module:params/testcases/tcompare separated entries | one | two | three | foo | bar | Jupiter | hello = world }} <includeonly>{{Sandbox other|| <!-- Categori..."
 
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 12: Line 12:
<includeonly>{{Sandbox other||
<includeonly>{{Sandbox other||
<!-- Categories below this line; interwikis at Wikidata -->
<!-- Categories below this line; interwikis at Wikidata -->
[[Category:Module misc pages]]
[[Category:Module testcases]]
[[Category:Module first misc]]
[[Category:Module sand&test]]
[[Category:Module test cases]]
}}</includeonly><noinclude>
}}</includeonly><noinclude>
[[Category:Module documents]]
[[Category:Module documents]]
[[Category:Module misc documents]]
[[Category:Module sand&test documents]]
</noinclude>
</noinclude>

Latest revision as of 21:14, 9 March 2025

This test template compares the behaviours of Module:Params with that of Module:Separated entries.

Usage

For instance,

{{ module:params/testcases/tcompare separated entries | one | two | three | foo  | bar | Jupiter | hello = world }}

generates

Without a last separator:

{{#invoke:separated entries|main|separator=+}}

one+two+three+foo+bar+Jupiter

{{#invoke:params|sequential|squeezing|trimming_values|setting|i|+|list_values}}

one+two+three+foo+bar+Jupiter

With a last separator (::):

{{#invoke:params|sequential|squeezing|trimming_values|setting|i/l|+|::|list_values}}

one+two+three+foo+bar::Jupiter

{{#invoke:separated entries|main|separator=+|conjunction=::}}

one+two+three+foo+bar::Jupiter

With a last separator (::) and cutting the first three parameters:

{{#invoke:params|sequential|cutting|3|0|squeezing|trimming_values|setting|i/l|+|::|list_values}}

foo+bar::Jupiter

{{#invoke:separated entries|main|separator=+|conjunction=::|start=4}}

foo+bar::Jupiter

Contents