Difference between revisions of "ExtractFileExt"

From SCAR Divi Manual
Jump to: navigation, search
(Created page with "==Definition== <source lang="scar" lines="false"> function ExtractFileExt(FileName: string): string; </source> ==Availability== SCAR Divi 3.00 > Current ==Description== Extract...")
 
 
Line 14: Line 14:
 
begin
 
begin
 
   WriteLn(ExtractFileExt('C:\Folder\File.Ext'));
 
   WriteLn(ExtractFileExt('C:\Folder\File.Ext'));
 +
  WriteLn(ExtractFileExt('File.Ext'));
 
end.
 
end.
 
</source>
 
</source>
  
 
Output:
 
Output:
 +
.Ext
 
  .Ext
 
  .Ext
  

Latest revision as of 14:33, 3 July 2011

Definition

function ExtractFileExt(FileName: string): string;

Availability

SCAR Divi 3.00 > Current

Description

Extracts the extension of a file path/name given by FileName. The result includes the leading dot.

Example

begin
  WriteLn(ExtractFileExt('C:\Folder\File.Ext'));
  WriteLn(ExtractFileExt('File.Ext'));
end.

Output:

.Ext
.Ext

See Also