Template:Str rightc

From LIMSWiki
Revision as of 20:29, 31 May 2013 by Shawndouglas (talk | contribs) (Protected "Template:Str rightc" ([edit=sysop] (indefinite) [move=sysop] (indefinite)))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search
[edit] [purge] Template documentation

Usage

{{Str rightc|<string>|<count>}}
{{Str rightc|<string>|<count>|<result if empty>}}

Gives a substring of length <count> of characters from the right-side end of the string.

Examples

  • {{Str rightc| lorem ipsum dolor sit amet | 10 }} → r sit amet
  • {{Str rightc| lorem ipsum dolor sit amet | 1 }} → t
  • {{Str rightc| lorem ipsum dolor sit amet | 0 }}
  • {{Str rightc| | 1 | empty }} → empty
  • {{Str rightc |123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.1 | 99}} → 3456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.max index is 100 for str sub long