Template:TitleParts/SizeOf/1
This template accepts two parameters. {{{1}}} represents a string array using the #titleparts format. {{{2}}} checks if the string array is exactly the specified length. On true {{{2}}} is returned otherwise an empty string Think of this template as the core for TitleParts/SizeOf. Enough talk, let's get coding! Begin Code Section -->{{#if:{{{1}}}|<!-- -->{{#ifeq:{{#titleparts:{{{1}}}|0|-1}}|{{#titleparts:{{{1}}}|0|1}}|<!-- -->{{#ifexpr:{{{2}}}=1|1}}<!-- -->|<!-- --><!--begin default--><!-- -->{{#ifeq:{{#titleparts:{{{1}}}|{{#expr:{{{2|0}}}+1}}|0}}|{{#titleparts:{{{1}}}|{{{2|0}}}|0}}|<!-- -->{{#ifeq:{{#titleparts:{{{1}}}|{{#expr:{{{2|0}}}-1}}|0}}|{{#titleparts:{{{1}}}|{{{2|0}}}|0}}|<!-- empty -->|{{{2|0}}}}}<!-- -->|<!-- empty --><!-- -->}}<!-- --><!--end default--> }}<!-- -->|{{#ifexpr: {{{2|0}}}=0|0|<!--empty-->}}<!-- -->}}<!-- End Code Section
-->This is a helper template that is required by Template:TitleParts/SizeOf which in turn is required by Template:TitleParts/Splice. This template is meant only for usage by Template:TitleParts/SizeOf.
Example
- "{{Template:TitleParts/SizeOf/1|A/B/C/D/E/F/G|6}}"
- ""
- "{{Template:TitleParts/SizeOf/1|A/B/C/D/E/F/G|7}}"
- "7"
- "{{Template:TitleParts/SizeOf/1|A/B/C/D/E/F/G|8}}"
- ""