Delphi Drawers

ファイル名から拡張子を除去

ファイル名から拡張子を除去した名前を抽出します。

function fnGetFileBaseName(strPath:string):string;
begin
  strPath := StringReplace(strPath, '/', '\', [rfReplaceAll]);
  fnGetFileBaseName := copy(ExtractFileName(strPath),1,
  length(ExtractFileName(strPath)) - length(ExtractFileExt(strPath))
  );
end;
Copyright © 2006 Hikijishi All Rights Reserved.
[] [delphi][0.00307607650756836]