Пређи на садржај

Шаблон:Str number/trimE/док

Iz Vojne Enciklopedije

{{#ifeq:док |док

    | 

{{#ifeq:show |show

|

        }}{{#if: |
         |   {{#ifexist:Шаблон:Str number/trimE
                  | [[Категорија:Документација {{#switch:Шаблон |Шаблон=шаблона |Модул=модула |Корисник=корисничких страница |#default=Википедије}}]]
                  | 
                 }}
        }}
    | 
   }}

The Template:Str_number/trimE extracts a number at the end of parameter 1.

It takes a string as parameter, and returns the string trimmed to the ending number if non-numeric text does not appear after the last number.

Examples

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

See also

References

1 }}
     | column-width: 30em;
     | {{#switch:|1=|2=column-width: 30em;|#default=column-width: 25em;}} }}
   | {{#if: 
     | column-width: 30em; }} }} list-style-type: {{#switch: 
   | upper-alpha
   | upper-roman
   | lower-alpha
   | lower-greek
   | lower-roman = {{{група}}}
   | #default = decimal}};">
  1. a reference