delphi截取字符串


本文整理自网络,侵删。

 //delphi截取字符串

function GetStr(StrSource,StrBegin,StrEnd:string):string;
var
in_star,in_end:integer;
strtmp:string;
begin
in_star:=AnsiPos(strbegin,strsource)+length(strbegin);
strtmp:=copy(strsource,in_star,length(strsource));
in_end:=AnsiPos(strend,strtmp);
result:=copy(strsource,in_star,in_star + in_end-in_star -1);
end;

相关阅读 >>

Delphi中生成控件的两种方法

Delphi 获取某个页面所有的链接

Delphi研究之驱动开发篇(六)--利用section与用户模式程

firemonkey listbox 的几个事件:拖动,点击,长按

Delphi : tstringlist的find,indexof和sort

Delphi读写文本文件

Delphi 字符串中提取字母数字

Delphi实现变速齿轮

Delphi模仿“千千静听”滚动标题栏

Delphi 先加载原内容在写入增加新内容

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



打赏

取消

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

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

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

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

评论

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