本文整理自网络,侵删。
function GetFilepath(FileName: string): string; {从全路径中分离路径,有'\'}
var Contador: integer;
begin
Contador := 1;
while Copy(FileName, Length(FileName) - Contador, 1) <> '\' do
begin
Contador := Contador + 1;
end;
Result := (Copy(FileName, 1, Length(FileName) - Contador));
end;
相关阅读 >>
Delphi 的 webservice 的 cookie 操作
Delphi webbrowser载入自定义html内容并显示
Delphi sysutils.isdelimiter - 判断字符串的某个位置是不是指定的字符串
更多相关阅读请进入《Delphi》频道 >>