The Template:Str_number/trim extracts a number at the start of parameter 1.

It takes a string as parameter, and returns the string trimmed to the beginning numeral. It is limited to 11 digits. It cannot handle negative numbers and truncates decimals to whole numbers. A trailing reftag ("<ref>...</ref>") causes the number to repeat to 11 digits.

Examples మార్చు

  • {{Str number/trim}}
  • {{Str number/trim|abcde}}
  • {{Str number/trim|abcde123}}
  • {{Str number/trim|123456}}
  • {{Str number/trim|123 456}}
  • {{Str number/trim|1976–2006}}
  • {{Str number/trim|19/76+2006}}
  • {{Str number/trim|1234abc}}
  • {{Str number/trim|1234abc56}}
  • {{Str number/trim|12345678901234567890}}
  • {{Str number/trim|1234567890123456789012345}}
  • {{Str number/trim| 1234567890123456789012345}}
  • {{Str number/trim|13<ref>a reference</ref>}}

See also మార్చు

Description of all string templates

References మార్చు

  1. a reference