Modèle:Abbcontains

De Les Archives de Vault-Tec
Aller à : navigation, rechercher
Documentation du modèle (pour le modèle ci-dessus, parfois caché ou 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

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

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

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

OptionnelIcon optional.png
(default: "sep")
sep1

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

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

Source

  • Le modèle et sa page de documentation sont issus du Wikipédia The Vault. Vous pouvez les retrouver en suivant ce lien.
Documentation transclues de Modèle:Abbcontains/doc.