Template to check whether any member of a set of game abbrevations (used by e.g. {{Abb}}
is part of another set of abbreviations. Returns "1" if that is the case and an empty string otherwise.
Usage[]
{{abbcontains|set of abbrevations|abbrevation(s) to check for}}
Parameters[]
The set of abbreviations of which you would like to know whether it contains the abbreviation(s) specified in <unnamed 2>
. An unlimited number of abbreviations can be specified if separated with sep
/sep1
(see below).
The abbreviation(s) of which you would like to know whether it/they are contained in <unnamed 1>
. Up to 10 abbreviations can be specified if separated with sep
/sep2
(see below). A wildcard (*
) can be used at the end of each abbreviation which will match any number of characters; e.g. "FO3*" will match both "FO3" and "FO3OA".
The character or string with which abbreviations are separated in <unnamed 1>
and <unnamed 2>
. If sep1
or sep2
are specified, they override this parameter for the corresponding unnamed
parameter.
sep
")The character or string with which abbreviations are separated in <unnamed 1>
. Overrides sep
.
sep
")The character or string with which abbreviations are separated in <unnamed 2>
. Overrides sep
.
Examples[]
Simple[]
{{abbcontains|WL1, WL2, FOD|FOD}}
returns "1" because FOD is among the abbreviations in the first set.
{{abbcontains|WL1, WL2, FOD|MT}}
returns "" (an empty string) because MT is not among the abbreviations in the first set.
Checking for multiple abbrevations[]
{{abbcontains|WL1, WL2, FOD|WL1, WL2}}
returns "1" because both WL1 and WL2 are among the abbreviations in the first set.
{{abbcontains|WL1, WL2, FOD|WL2, MT}}
returns "1" because WL2 is among the abbreviations in the first set.
{{abbcontains|WL1, WL2, FOD|MT, WIKI}}
returns "" (an empty string) because neither "MT" nor "WIKI" are among the abbreviations in the first set.
Wildcards[]
{{abbcontains|WL1, WL2, FOD|WL2*}}
returns "1" because WL2 is among the abbreviations in the first set.
{{abbcontains|WL1, FOD|WL2*}}
returns "" (an empty string) because no abbreviation starting with WL2 is among the abbreviations in the first set.