Editing Template:Str right/doc
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
{{Documentation subpage}} | {{Documentation subpage}} | ||
− | |||
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --> | <!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --> | ||
− | == Usage == | + | === Usage === |
− | : {{ | + | : <code>{{Tlx|Str right|<string>|<offset>}}</code> |
Gives the characters from <offset> to the end of the string. | Gives the characters from <offset> to the end of the string. | ||
Line 13: | Line 12: | ||
If <offset> is longer than <string> then this returns an empty 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 | + | If <offset> is invalid, empty or undefined, this template goes berserk, so don't do that. |
− | === | + | === Limitations === |
− | * | + | * 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. |
− | * | ||
− | == | + | === Examples === |
− | {{ | + | *<tt><nowiki>{{Str right| lorem ipsum dolor sit amet | 10 }}</nowiki></tt> → {{Str right| lorem ipsum dolor sit amet | 10 }} |
− | < | + | *<tt><nowiki>{{Str right| lorem ipsum dolor sit amet | 1 }}</nowiki></tt> → {{Str right| lorem ipsum dolor sit amet | 1 }} |
− | { | + | *<tt><nowiki>{{Str right| lorem ipsum dolor sit amet | 0 }}</nowiki></tt> → {{Str right| lorem ipsum dolor sit amet | 0 }} |
− | + | *<tt><nowiki>{{Str right |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}} | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | </ | ||
− | == See also == | + | === See also === |
− | + | {{String templates see also}} | |
− | |||
− | |||
− | |||
− | {{String | ||
<includeonly> | <includeonly> | ||
− | <! | + | <!-- CATEGORIES AND INTERWIKIS HERE, THANKS --> |
[[Category:String manipulation templates]] | [[Category:String manipulation templates]] | ||
− | + | [[ar:قالب:Str right]] | |
− | [[ | + | [[cy:Nodyn:Str right]] |
+ | [[es:Plantilla:Str right]] | ||
+ | [[id:Templat:Str right]] | ||
+ | [[ja:Template:Str right]] | ||
+ | [[ru:Шаблон:Str right]] | ||
+ | [[ur:Template:Str right]] | ||
</includeonly> | </includeonly> |