Template:Lz3
- Code:
- {{{{{|safesubst:}}}#ifexpr: 0 <= ({{{1}}}) and ({{{1}}}) < 10|00|{{{{{|safesubst:}}}#ifexpr: 10 <= ({{{1}}}) and ({{{1}}}) < 100|0}}}}{{{{{|safesubst:}}}#expr:{{{1}}}}}
Provides leading zeros to obtain three digits:
- {{
lz3|-1
}} gives -1 - {{
lz3|.0
}} gives 000 - {{
lz3|.1
}} gives 000.1 - {{
lz3|1
}} gives 001 - {{
lz3|12
}} gives 012 - {{
lz3|123
}} gives 123 - {{
lz3|7+5
}} gives 012