« Modèle:Splitter/doc » : différence entre les versions
Aller à la navigation
Aller à la recherche
Page créée avec « This is a quick and dirty string manipulator with limited capabilities. It can probably be replaced by something more robust using some StringFunctions like [http://www.me... » |
Aucun résumé des modifications |
||
Ligne 9 : | Ligne 9 : | ||
The template will separate the string provided in the first parameter at each backslash (/; using <nowiki>#titleparts</nowiki> and return each substring formatted as instructed by the parameters, up to nine items. This can be useful to perform operations on a given list. For example, this template is used by [[Template:Infobox Quests]] to linkify and categorize quests available to more than one (but not all) races (such as [[Quest:Intro: The Storm is Upon Us]]). | The template will separate the string provided in the first parameter at each backslash (/; using <nowiki>#titleparts</nowiki> and return each substring formatted as instructed by the parameters, up to nine items. This can be useful to perform operations on a given list. For example, this template is used by [[Template:Infobox Quests]] to linkify and categorize quests available to more than one (but not all) races (such as [[Quest:Intro: The Storm is Upon Us]]). | ||
<noinclude>[[Category: | <noinclude>[[Category:Modèle (Documentation)]]</noinclude> |
Dernière version du 20 mai 2013 à 14:44
This is a quick and dirty string manipulator with limited capabilities. It can probably be replaced by something more robust using some StringFunctions like explode. For now, though....
- Takes up to four parameters, as follows:
- A string to be split. This must be in the form of several items separated by backslashes. For example,
Man/Hobbit/Elf
. - A separator string. The default value is a nonbreaking space, but this can be any combination of spaces and characters; this will be inserted between each substirng
- A prefix string. This is added to the beginning of each substring.
- A postfix string. This is added to the end of each substring.
The template will separate the string provided in the first parameter at each backslash (/; using #titleparts and return each substring formatted as instructed by the parameters, up to nine items. This can be useful to perform operations on a given list. For example, this template is used by Template:Infobox Quests to linkify and categorize quests available to more than one (but not all) races (such as Quest:Intro: The Storm is Upon Us).