InuYasha
Advertisement
Animepedia Please Note, this page is synced using the TagSyncBot. When the bot is run any change you have made to this page will be overwritten. Please make changes on its page on the Animepedia at Anime:Template:IBox/Mutation/Split-and-Merge.

{{iBox/Mutation/Split-and-Merge}} is part of the mutations in the {{iBox}} system. It is used to split text by a separator, and then merge them together with extra formatting wrapped around.

Usage[]

{{iBox/Mutation/Split-and-Merge|Input|separator=Separator|wrapper=General wrapper text|first=First item wrapper text|last=Final item wrapper text|only=Single item wrapper text|item param=Item replacement parameter}}
{{iBox/Mutation/Split-and-Merge|Input|separator=Separator|template=Template|opt1=Optional 1|...|opt5=Optional 5}}
  • Input is the text to split and merge.
    • The Input can have a maximum of 25 items inside.
  • Separator is the text to separate the input by, by default this is a comma(,).
  • Split-and-Merge can sue either input text, or call another template to do the text wrapping.
    • Using the input text method you use the parameters:
      • wrapper is the general text to be used for item wrapping.
      • first is an alternate wrapper to use when on the first item, if not specified wrapper will be used instead, however this will not be used when there is only one item in the list.
      • last is an alternate wrapper to use when on the final item, if not specified wrapper will be used instead, however this will not be used when there is only one item in the list.
      • only is a special alternate wrapper to use when there is only a single item in the input, if not specified wrapper will be used instead.
      • dual is a special alternate wrapper to use when there are only 2 items inside the input, if not specified first will be used instead, and fall back to wrapper if first is not specified either.
      • dual-second is a special alternate wrapper to use when there are only 2 items inside the input, it is used to make the first (use dual) and second (use dual-second) items have different wrappers, if not specified dual will be used instead, falling back to last if dual is not specified either and then to wrapper if last isn't specified.
      • The Item replacement parameter is the text used inside of a wrapper that is replaced with the current item split from the Input. The default is $s$.
    • Using the template call method you use the parameter:
      • Template is the name of the template to call, the parameters which are passed to this template are:
        • {{{item}}} is the text of the current item split from Input.
        • {{{index}}} is the current item's index (0 based).
        • {{{first}}} is 1 when the current item is the first, and empty otherwise.
        • {{{last}}} is 1 when the current item is the last, and empty otherwise.
        • {{{quantity}}} is the total number of items inside the Input.
      • Optional #' are optional arguments which you can pass to the template.
        • These will be the {{{#}}} parameters inside of the template.
        • You can only input a maximum of 5 of these.
        • Please note that these will be passed to the template no matter what. So {{{1}}} will default to something empty when opt1 is not passed and so you cannot check if they were passed or not. And you cannot use default as it will be passed empty and the default will never be used.
  • Note that the input text method overrides the template.

Premade templates[]

Advertisement