Delphi 简单字符串截取函数


本文整理自网络,侵删。

 
function WrapArtistName(s,s1,s2: string): string;
var pos_start, pos_end: integer;
begin
  pos_start:= Pos(s1,s);
  Pos_end:= Pos(s2,s);
  if (pos_start=0) or (Pos_end=0) or (pos_start>=pos_end)
    then begin Result:= ''; Exit; end;
  Result:= Trim(Copy(s,pos_start+6,pos_end-pos_start-8));
end;


procedure TForm1.FormCreate(Sender: TObject);
begin
Caption:=WrapArtistName('<a href="/html/?1667.html" target="_blank">CHM一键反编译1.0</a>','href','target');
end;

相关阅读 >>

isleapyear:返回给定的年份是否是闰年

Delphi 取得固定长度的随机字符串

Delphi format 另类用法

Delphi 通过http获取软件版本

Delphi types of actual and formal var parameters must be identical

Delphi xe5在zip文件中添加某个txt文件并写入文字

Delphi sccoloredid,星际争霸彩色 id 修改器 v0.2.0,支持 windows vista

Delphi xe5复制粘贴操作

Delphi10.3模拟读取百度网页,并读取相关头部信息

Delphi之软件检测更新

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...