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 用idhttp获取utf-8编码的网页

Delphi fdmemtable中如何在已有的字段数据集上加入字段

Delphi createdir 建立文件夹路径

Delphi 下载一个jpg图片保存为bmp图片

Delphi tstringdynarray 使用,分割字符串

Delphi中使用临界区来让线程同步

Delphi unigui 安装和配置hyperserver

Delphi 备份恢复剪切板

Delphi firemonkey移动应用程序将设置保存到ini文件的示例

Delphi for 循环 downto用法

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



打赏

取消

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

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

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

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

评论

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