Difference between revisions of "Fileext"

From Sega Retro

(simplified)
Line 1: Line 1:
<includeonly>{{#ifeq:{{{1|}}}|-1||{{#sub:{{{1|}}}|{{#expr:{{#rpos:{{{1|}}}|.}}-{{#len:{{{1|}}}}}+1}}}}}}</includeonly><noinclude>
+
<includeonly>{{#ifeq:{{#rpos:{{{1|}}}|.}}|-1||{{#sub:{{{1|}}}|{{#expr:{{#rpos:{{{1|}}}|.}}-{{#len:{{{1|}}}}}+1}}}}}}</includeonly><noinclude>
 
This template returns the file extension of a file link or url.
 
This template returns the file extension of a file link or url.
  

Revision as of 00:33, 23 January 2015

This template returns the file extension of a file link or url.

Example

{{fileext|Filename.txt}}

gives the result:

txt