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 |
||
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]] |
</noinclude> | </noinclude> |
Revision as of 04:25, 25 November 2019
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.