Difference between revisions of "Template:Removelc"

From Space Engineers Wiki
Jump to: navigation, search
m (Added description and example)
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
{{#if: {{#rpos: {{{1|}}} | / }}||{{{1}}}}}<noinclude>[[Category:Templates]]</noinclude>
+
<includeonly>{{#ifeq: {{#rpos: {{{1|}}} | / }}| -1 |{{{1|}}}|{{#sub: {{{1|}}}|0|{{#rpos: {{{1|}}} | / }}}}}}</includeonly><noinclude>
 +
Removes everything including the forward-slash from the end of a string and returns it.
 +
 
 +
Used to remove the language part (e.g. <code>/fr</code>) of page's name, if it exists.
 +
 
 +
For example: <code><nowiki>{{Removelc|Main_Page/fr}}</nowiki></code> becomes <code>{{Removelc|Main_Page/fr}}</code>
 +
[[Category:Templates]]</noinclude>

Latest revision as of 11:32, 28 March 2020

Removes everything including the forward-slash from the end of a string and returns it.

Used to remove the language part (e.g. /fr) of page's name, if it exists.

For example: {{Removelc|Main_Page/fr}} becomes Main_Page