Module:Str rightc/doc

Revision as of 20:36, 27 July 2026 by Wikipedia>Pppery ({{used in system}})
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This is the documentation page for Module:Str rightc


This implements: {{str rightc}} but if |notemplate= is set to a non-empty string, arguments from the invocation can be used.

Usage

{{#invoke:str rightc|rightc|notemplate=1|string|count}}
{{#invoke:str rightc|rightc|notemplate=1|string|count|result if empty}}

Gives a substring of length count characters from the right-side end of the string, or, if provided, returns result if empty when string is empty.

Examples

  • {{#invoke:str rightc|rightc|notemplate=1 |Lorem ipsum dolor sit amet |10}} → r sit amet
  • {{#invoke:str rightc|rightc|notemplate=1 |Lorem ipsum dolor sit amet |1}} → t
  • {{#invoke:str rightc|rightc|notemplate=1 |Lorem ipsum dolor sit amet |0}} →
  • {{#invoke:str rightc|rightc|notemplate=1 | |1 |string is empty}} → string is empty
  • {{#invoke:str rightc|rightc|notemplate=1 |123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-1 |99}} → 3456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-1