We've Moved! Just as Gamepedia has joined forces with Fandom, this wiki had joined forces with our Fandom equivalent. The wiki has been archived and we ask that readers and editors move to the now combined wiki on Fandom. Click to go to the new wiki.

Abbcontains

Template documentation (for the template shown above, sometimes hidden or invisible)

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.

Auxiliary template for Template:Infobox.

Usage

{{abbcontains|set of abbrevations|abbrevation(s) to check for}}

Parameters

Required Icon required.png
<unnamed 1>

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).

Required Icon required.png
<unnamed 2>

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".

Optional Icon optional.png
(default: ",")
sep

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.

Optional Icon optional.png
(default: "sep")
sep1

The character or string with which abbreviations are separated in <unnamed 1>. Overrides sep.

Optional Icon optional.png
(default: "sep")
sep2

The character or string with which abbreviations are separated in <unnamed 2>. Overrides sep.

Examples

Simple

{{abbcontains|FO1, FO2, FO3|FO3}}

returns "1" because FO3 is among the abbreviations in the first set.

{{abbcontains|FO1, FO2, FO3|FNV}}

returns "" (an empty string) because FNV is not among the abbreviations in the first set.

Checking for multiple abbrevations

{{abbcontains|FO1, FO2, FO3|FO2, FO3}}

returns "1" because both FO2 and FO3 are among the abbreviations in the first set.

{{abbcontains|FO1, FO2, FO3|FO3, FOT}}

returns "1" because FO3 is among the abbreviations in the first set.

{{abbcontains|FO1, FO2, FO3|FOT, FOBOS}}

returns "" (an empty string) because neither "FOT" nor "FOBOS" are among the abbreviations in the first set.

Wildcards

{{abbcontains|FO1, FO2, FO3|FO3*}}

returns "1" because FO3 is among the abbreviations in the first set.

{{abbcontains|FO1, FO2, FO3OA|FO3*}}

returns "1" because FO3OA is among the abbreviations in the first set.

{{abbcontains|FO1, FO2, FOT|FO3*}}

returns "" (an empty string) because no abbreviation starting with FO3 is among the abbreviations in the first set.

Non-standard delimiters

{{abbcontains|FO1-FO2-FO3|FO3-FNV|sep=-}}

returns "1".

{{abbcontains|FO1-FO2-FO3|FO3.FNV|sep1=-|sep2=.}}

returns "1".

Documentation transcluded from Template:Abbcontains/doc.
Community content is available under CC BY-SA 3.0 unless otherwise noted.