Template:Str endswith: Difference between revisions
Content added Content deleted
(changed from Template:Str_left to use {padleft:| len(1) - len(2) |{1} }, to reduce expansion depth to 14 levels from 16.) |
(Lua version) |
||
Line 1: | Line 1: | ||
{{#ifeq:{{#Invoke:String|sub|{{{1|}}}| -{{#invoke:String|len|{{{2}}}}} |ignore_errors=true}}|{{{2|}}}|yes}}<noinclude> |
|||
{{#ifeq: {{padleft:|{{#expr:{{str len |nocategory={{{nocategory|}}} |{{{1|Abcdef}}}}}-{{str len |nocategory={{{nocategory|}}} |{{{2|ef}}}}} }}|{{{1|Abcdef}}} }}{{str trim |nocategory={{{nocategory|}}} |{{{2|ef}}}}} | {{str trim |nocategory={{{nocategory|}}} |{{{1|Abcdef}}}}} |
|||
| yes |
|||
}}<noinclude> |
|||
{{documentation}} |
{{documentation}} |
||