User Tools

Site Tools


syntax:functions:fileextension

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
syntax:functions:fileextension [2018/06/11 07:16] – created dmitrysyntax:functions:fileextension [2023/05/02 11:41] (current) – [Examples] correct function name craigt
Line 1: Line 1:
-===== fileextension(text) =====+====== FileExtension(full_path) =====
 +Category:  File function  (found in the "Special" category in the EasyMorph application)
  
-Extracts the file extension (with dot) from a full file path.+\\  
 +=====Description===== 
 +This function extracts the file extension (with dot) from a full file path.
  
- Example   Result  +\\  
-| fileextension('C:\Documents\myproject.morph')  |.morph |+=====Arguments===== 
 +^Argument^Type^Description
 +|path  |Text  |A file path including the file name.| 
 + 
 +**Return value type:** Text. 
 + 
 +\\  
 +=====Remarks===== 
 +This function works with both relative and absolute file paths.  
 + 
 +The file extension is the characters after the last dot, not the first dot. 
 + 
 + 
 +\\  
 +=====Examples===== 
 + 
 +  fileextension('C:\Documents\myproject.morph')  //Returns '.morph
 + 
 +  fileextension('…\mypath\myfile.txt' //Returns '.txt' 
 + 
 +\\  
 +=====See also===== 
 +  * [[syntax:functions:directory|Directory(full_path)]] 
 +  * [[syntax:functions:filename|FileName(full_path)]]
syntax/functions/fileextension.1528715762.txt.gz · Last modified: 2018/06/11 07:16 by dmitry

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki