#1 2021-01-19 12:01:52

tbo
Member
Registered: 2015-04-20
Posts: 349

Change description for GetFileNameWithoutExt()

Function GetFileNameWithoutExt() in Unit SynCommons.

/// extract file name, without its extension
// - may optionally return the associated extension, as '.ext'
function GetFileNameWithoutExt(const FileName: TFileName; Extension: PFileName=nil): TFileName;  

Arnaud, can you please add to the description that here path and filename is returned. The description "extract file name" made me think that I get the same result back as with the function ExtractFileName().

Or can you additionally add the function ExtractFileNameWithoutExt().

function ExtractFileNameWithoutExt(const pmcFileName: TFileName): TFileName; 
begin
  Result := ExtractFileName(GetFileNameWithoutExt(pmcFileName));
end;  

With best regards
Thomas

Offline

#2 2021-01-19 13:13:39

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,548
Website

Re: Change description for GetFileNameWithoutExt()

Online

Board footer

Powered by FluxBB