Template:Digits/doc
Appearance
| This is a documentation subpage for Template:Digits. It may contain usage information, categories and other content that is not part of the original template page. |
| This template uses Lua: |
Usage
[change source]{{digits|string}}
{{digits|1=string}}
Removes all characters from string that are not a digit 0–9.
Examples
[change source]{{digits|12px}}→ 12
{{digits|1,234,567}}→ 1234567
{{digits|$1.23}}→ 123
{{digits|1=1+2=3}}→ 123
{{digits|24.51 km (15.23 mi)}}→ 24511523
Related pages
[change source]- {{str number/trim}}, remove the first non-digit character and everything following