Actions

Template

Pagecount

From Sonic Retro

Revision as of 15:56, 27 July 2016 by Hivebrain (talk | contribs) (Created page with "<includeonly>{{#vardefine:pagecountresult|0}} {{#loop: chunknum |0 |{{#expr:{{charcount|{{{1}}}|,}}+1}} |{{#vardefine:chunk|{{#explode:{{{1}}}|,|{{#var:chunknum}}}}}} {{addva...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Calculate the size of a range (inclusive) given by the format "a-b". It also works with broken ranges in the format "a-b,c-d".

Example: {{pagecount|12-14}} becomes 3.

Example: {{pagecount|12-14,17,20-21}} becomes 6.