Fyrimynd:Str rightc
Usage rætta
{{str rightc|<string>|<count>}}
{{str rightc|<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 rætta
{{str rightc |Lorem ipsum dolor sit amet |10}}
→ Lorem ipsu{{str rightc |Lorem ipsum dolor sit amet |1}}
→ L{{str rightc |Lorem ipsum dolor sit amet |0}}
→{{str rightc | |1 |string is empty}}
→ string is empty{{str rightc |123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.1 |99}}
→ 123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789
TemplateData rætta
Hetta er TemplateData dokumentatiónin fyri hesa fyrimynd, ið verður brúkt av VisualEditor og øðrum tólum.
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 rætta
- {{str right}}
- {{str rightmost}}
- {{str left}}
Dokumentatiónin omanfyri er tikin frá Fyrimynd:Str rightc/doc. (rætta | søga) Editors can experiment in this template's sandkassi (upprætta | mirror) and testcases (upprætta) pages. Please add categories to the /doc subpage. Undirsíður til hesa/hetta fyrimyndina. |