Delphi 截取字符串的用法


本文整理自网络,侵删。

 
function Parse(text, sol, sag: string): String;
begin
  Delete(text, 1, Pos(sol, text) + Length(sol) - 1);
  Result := Copy(text, 1, Pos(sag, text) - 1);
end;


procedure TForm1.FormCreate(Sender: TObject);
begin
Caption:=Parse('123456789','12','89');     //结果 34567
end;

相关阅读 >>

Delphi文本文件读写

Delphi读取和写入utf-8编码格式的文件

Delphi downloadtomemory

Delphi x 的 y 次方

Delphi 对int64计算的一种处理方式

Delphi 10.3 断点调试相关快捷键

Delphi10.3读取json数组

Delphi 给动态数组添加一个元素

Delphi 获取指定进程中的~内存数据

Delphi xe mysql数据库操作类 mysqlhelper

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



打赏

取消

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

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

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

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

评论

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