Template:Str rightc
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.1
TemplateData
This is the TemplateData documentation for this template used by VisualEditor and other tools; see the monthly parameter usage report for this template.
TemplateData for Str rightc
Gives the right most <count> characters of a string.
Parameter | Description | Type | Status | |
---|---|---|---|---|
String | 1 | The string to be trimmed | String | required |
Count | 2 | The number of characters from the right to return | Number | required |
result if empty | 3 | The result if the string is empty | String | optional |
See also
Script error: The function "navbox" does not exist.
The above documentation is transcluded from Template:Str rightc/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |