Delphi 获取指定字符串后面的所有的字符串


本文整理自网络,侵删。

 


function DeleteUntilLast(const Text, UntilLastStr: string): string;
var
  i: Integer;
begin
  Result := Text;
  i      := pos(UntilLastStr, Result);
  while i > 0 do
  begin
    Delete(Result, 1, i);
    i := pos(UntilLastStr, Result);
  end;
end;


procedure TForm1.Button1Click(Sender: TObject);
begin
Memo1.Text:=DeleteUntilLast(Edit1.Text,Edit2.Text);
end;

相关阅读 >>

Delphi copy 字符串函数

Delphi system.sysutils.tmarshaller 与 system.tmarshal

Delphi 防止程序重复执行的单元

Delphi 秒计算分钟、小时函数

Delphi 实现软件版验证码

Delphi 打开android应用信息

Delphi汇编级初探

Delphi ord chr byte等转换

Delphi 中 使用 tidhttp 提交post数据

Delphi 根据delta自动生成sql语句

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



打赏

取消

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

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

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

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

评论

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