Actions

Template

Versionsort

From Sega Retro

Converts a version number into something a wiki table can sort. Letters and brackets are stripped/ignored.

Example:

{{versionsort|1.2.3}} returns {{#pad:1|6|0}}{{#pad:2|6|0}}{{#pad:3|6|0}}{{#pad:|6|0}}{{#pad:|6|0}}

{{versionsort|2.55.0.1}} returns {{#pad:2|6|0}}{{#pad:55|6|0}}{{#pad:0|6|0}}{{#pad:1|6|0}}{{#pad:|6|0}}

{{versionsort|99.X.555 (Hello)}} returns {{#pad:99|6|0}}{{#pad:|6|0}}{{#pad:555|6|0}}{{#pad:|6|0}}{{#pad:|6|0}}

{{versionsort|4.5.6 (123)}} returns {{#pad:4|6|0}}{{#pad:5|6|0}}{{#pad:6|6|0}}{{#pad:|6|0}}{{#pad:|6|0}}