「テンプレート:Lz12」の版間の差分

提供:脳科学辞典
ナビゲーションに移動 検索に移動
(1版)
 
(相違点なし)

2015年3月14日 (土) 12:15時点における最新版

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