Template:Digits

From MEpedia, a crowd-sourced encyclopedia of ME and CFS science and history
template icon Template documentation[view] [edit] [history] [purge]

Usage[edit source]

{{digits|string}}

{{digits|1=string}}

Removes all characters from string that are not a digit 0–9.

Examples[edit source]

{{digits|12px}} → 12

{{digits|1,234,567}} → 1234567

{{digits|$1.23}} → 123

{{digits|1=1+2=3}} → 123

{{digits|PMC1700895}} 1700895

See also[edit source]

  • {{tl|str number/trim}}

}}