本文整理自网络,侵删。
function GetLastName(const fn: string): string;var i:Integer; s:string;begin s := trim(fn); if s[Length(s)]='\' then s := Copy(s,1,Length(s)-1);
while Pos('\',s)>0 do begin i := Pos('\',s); s := Copy(s,i+1,Length(s)-i); end; Result := s;end;
procedure TForm1.FormCreate(Sender: TObject);varstr:string;begin
caption := GetLastName('\sfsdf\sdfsdfs\电影名称');end;
相关阅读 >>
Delphi webbrowser控件的documentcomplete和downloadcomplete的区别
检测是否按下键盘或鼠标,如果超过5分钟没有操作则认为用户已经离开
Delphi twebbrowser出现 method pastehtml not supported by automation object 解决方法
Delphi strutils.reversestring - 翻转字符串
Delphi 与 xml 示例(直接利用ixmldocument)
更多相关阅读请进入《Delphi》频道 >>