Template:StripLastWord: Difference between revisions

From RadiWiki
Jump to navigation Jump to search
(Created page with '<!-- Strips the last word of the passed content. Using functions from the StringFunctions extension-->{{#sub:{{{1}}}|0|{{#rpos:{{{1}}}| }}}}')
 
No edit summary
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
<!-- Strips the last word of the passed content. Using functions from the StringFunctions extension-->{{#sub:{{{1}}}|0|{{#rpos:{{{1}}}|&#32;}}}}
{{#ifeq:{{#rpos:{{{1}}}| }}|-1|<!-- no space found -->|{{#sub:{{{1}}}|0|{{#rpos:{{{1}}}| }}}}}}<noinclude>Strips the last word of the passed content. Using functions from the StringFunctions extension. Can a space be found? Then return everything before the last space. Can't a space be found. Then return nothing.</noinclude>

Latest revision as of 19:46, 13 February 2020

Strips the last word of the passed content. Using functions from the StringFunctions extension. Can a space be found? Then return everything before the last space. Can't a space be found. Then return nothing.