本文整理自网络,侵删。
{delphi 截取绝对路径的文件名。}
function ExtractFileName(Str: string): string;
var
i: Integer;
begin
Result := '';
for i := Length(Str) downto 1 do
begin
if Str[i] <> '\' then Insert(Str[i], Result, 0)
else Exit;
end;
end;
相关阅读 >>
Delphi新建服务,停止系统服务,以及获取服务状态和新建系统服务器的方法
Delphi xe安装 tclientsocket, tserversocket控件
Delphi:窗体的扩展样式gwl_exstyle用于setwindowlong
Delphi 采用 tidhttp 访问 https 的网站,采用 tidtcpclient 访问 https 的网站
更多相关阅读请进入《Delphi》频道 >>