/>Putnik |
|
Строка 1: |
Строка 1: |
| <noinclude>{{docpage}}</noinclude> | | <includeonly>{{#invoke:navbox|navboxWithCollapsibleGroups}}</includeonly><noinclude>{{doc}}</noinclude> |
| | |
| === Использование ===
| |
| | |
| : <code>{{Tlx|Str rightc|<string>|<count>}}</code> | |
| | |
| Gives the <count> substring of characters from the right-side end of the string.
| |
| | |
| If <count> is invalid, empty or undefined, this template goes berserk, so don't do that.
| |
|
| |
| === Ограничения ===
| |
| | |
| * Up to 100 chararacters in the input string. If possible, first check length of input string using {{Tl|Str len|<string>}}. Using strings longer than 100 characters may result in the error '''''"<font color=#CC1100>max index is 100 for str_sub</font>"'''''.
| |
| * Limited set of characters.
| |
| * Expensive.
| |
| | |
| === Примеры ===
| |
| | |
| *<tt><nowiki>{{Str rightc| lorem ipsum dolor sit amet | 10 }}</nowiki></tt> → {{Str rightc| lorem ipsum dolor sit amet | 10 }}
| |
| *<tt><nowiki>{{Str rightc| lorem ipsum dolor sit amet | 1 }}</nowiki></tt> → {{Str rightc| lorem ipsum dolor sit amet | 1 }}
| |
| *<tt><nowiki>{{Str rightc| lorem ipsum dolor sit amet | 0 }}</nowiki></tt> → {{Str rightc| lorem ipsum dolor sit amet | 0 }}
| |
| *<tt><nowiki>{{Str rightc |123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.1 | 99}}</nowiki></tt> → {{Str rightc |nocategory=true |123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.1 | 99}}
| |
| | |
| === См. также ===
| |
| * {{Tl|Trunc|<string>|<count>}} - truncate right-side of string
| |
| * {{Tl|Str left|<string>|<count>}} - extract left-side substring
| |
| * {{Tl|Str right|<string>|<count>}} - extract remainder of string
| |
| * {{Tl|Str len|<string>}} - get numeric length of string (can be over 300 long)
| |