Template:Array norepeat

From Abulafia Random Generator Wiki
Jump to navigation Jump to search


This template simulates basic array functions.
Arrays are accepted as strings, with each element separated by a pipe |
As the the pipe is used to separate parameters, when manually creating an array you can use {{!}}.

This template will accept a simulated array, and an additional element. If the new element is not yet in the array it will be appended to the end.


{{Array_norepeat|a{{!}}b{{!}}c|b}} → “a|b|c”

{{Array_norepeat|a{{!}}b{{!}}c|d}} → “a|b|c|d”

{{Array_norepeat|a{{!}}b{{!}}c|a}} → “a|b|c”

{{Array_norepeat||a}} → “a”

{{Array_norepeat|a|}} → “a”

{{Array_norepeat||}} → “”

{{Array_norepeat}} → “”