Module:String List/doc

From Sun Haven Wiki
Jump to navigation Jump to search

This is the documentation page for Module:String List

This module is mainly for use with DPL outputs. When a page uses the same template multiple times, the output will have repeated text or too many results that cannot be filtered. Using DPL in conjunction with this module can solve some of those issues.

Usage

{{#invoke: String List|main
|text that needs separating
|delim=character to separate text by. Recommended to use something like @. Multiple characters will produce unexpected results.
|join_with=characters(s) to put between resulting list items.
|from=start number (index) of resulting items to display (optional)
|to=end number (index) of resulting items to display (optional)
|distinct=true if removing duplicate items, omit if not.
}}

Examples

{{#invoke: String List|main|abc@def@ghi@jkl|delim=@|from=2|to=4}}

def, ghi, jkl

{{#invoke: String List|main|Sea;Sea;Sea;Beach;Sea;Farm;|delim=;|distinct=true}}

Sea~Beach~Farm

{{#invoke: String List|main|First;Second;Third;Fourth|delim=;|from=2|to=2}}

Second

{{#invoke: String List|main|{{#dpl:
|title         = Xyla/Dialogue
|include       = {Chat}:2
|secseparators = @
|format        = ,,,
}}|delim=@|from=2|to=5|join_with=<br>}}

What are you looking at, sewer rat?
How's it feel to be in the company of the upper class?
If you keep staring at me, I'm going to remove your ability to stare at anything.
Don't try me, outsider, or I'll show you what these horns can do.


Subpages