Difference between revisions of "Template:Str right"
(Created page with "<includeonly>{{{{{|safesubst:}}}#ifexpr: {{{2|0}}} < 0 |{{{1}}} |{{{{{|safesubst:}}}#ifexpr: {{{2|0}}}+1 > {{{{{|safesubst:}}}#invoke:String|len|s={{{1}}}}} | | {{{{{|safesub...") |
m (Added to Category:Auxiliary templates) |
||
(One intermediate revision by one other user not shown) | |||
Line 4: | Line 4: | ||
{{{{{|safesubst:}}}#Invoke:String|sub|s={{{1}}}|{{{{{|safesubst:}}}#expr:{{{2|0}}}+1}}|nocategory={{{nocategory|}}}}} }} | {{{{{|safesubst:}}}#Invoke:String|sub|s={{{1}}}|{{{{{|safesubst:}}}#expr:{{{2|0}}}+1}}|nocategory={{{nocategory|}}}}} }} | ||
}}</includeonly><noinclude> | }}</includeonly><noinclude> | ||
− | {{Documentation}} | + | {{Documentation}}[[Category:String manipulation templates]][[Category:Auxiliary templates]] |
</noinclude> | </noinclude> |
Latest revision as of 12:26, 30 January 2021
This template was originally from Template:Str right in English Wikipedia.
Usage
{{str right|<string>|<offset>}}
Gives the characters from <offset> to the end of the string.
A negative <offset> is treated the same as zero, which simply returns the original string.
If <offset> is longer than <string> then this returns an empty string.
If <offset> is invalid, empty or undefined, this template goes berserk, so please avoid.