テンプレート:Lz12

2015年3月14日 (土) 12:15時点におけるNijcadmin (トーク | 投稿記録)による版 (1版)
(差分) ← 古い版 | 最新版 (差分) | 新しい版 → (差分)
This auxiliary template adds leading zeros to a non-negative result of an expression for a total length of 12 digits (before the decimal point if any), it's used by template:Evalint (edittalklinkshistory), and it supports optional substitution.
{{Lz12|123}} gives 000000000123
{{Lz12|1234567}} gives 000001234567
{{Lz12|-.1}} gives value out of range:-0.1
{{Lz12|0.0}} gives 000000000000
{{Lz12|+.1}} gives 000000000000.1
{{Lz12|1234567890123}} gives value out of range:1234567890123
{{Lz12|123456789012.}} gives 123456789012
{{Lz12|1234567.90123}} gives 000001234567.90123
{{Lz12|12.4567890123}} gives 000000000012.4567890123

Compare

:

{{lz|12|123}} gives Hammer (Last Stone First End)123