delphi过滤字符串头部和尾部得到中间部分


本文整理自网络,侵删。

 var
sString: string;
iPos,iLen: integer;
begin
sString:= 'http://www.3464.com/article.asp?articleid=4750';
iLen:= Length(sString);
iPos:= Pos('/',sString);
if iPos=0 then
Exit;
sString:= Copy(sString, iPos+2,iLen-iPos);
iPos:= Pos('/',sString);
if iPos=0 then
Exit;
sString:= Copy(sString, 1,iPos-1);
end;

相关阅读 >>

Delphi发送邮件函数

Delphi 过滤开头 结尾 全部 空格的函数

Delphi memo1 高亮行的范围

Delphi adoquery查询更改用户

Delphi xe5 重启 关闭 windows 8

Delphi strtodatetime 这个函数在win7下出错

incsecond:将一个tdatetime变量加减一定数量的秒数

Delphi idhttpserver的使用方法

Delphi整理七(function and procedure)

Delphi 读取eset nod32 的用户名与密码

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



打赏

取消

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

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

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

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

评论

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