Delphi 检验指定字符串网址是否输入正确


本文整理自网络,侵删。

 //如:http://www.delphitop.com/

function CheckUrl(const sUrl:string):Boolean;
var
  bl :Boolean;
begin
  Result := False;
  bl := Pos('http://www.',LowerCase(sUrl))>0;
  bl := bl or (Pos('.delphitop.',LowerCase(sUrl))>0);
  if not bl then
  begin
    MessageBox(0, 'URL地址配置不正确!请检查后重试! ', '系统提示',
      MB_OK + MB_ICONSTOP + MB_TOPMOST);
    Exit;
  end;
  Result := bl;
end;

相关阅读 >>

Delphi窗体自适应分辨率

Delphi access 从数据库里随机选择一行

Delphi idftp连不上ftp服务器的解决方法

Delphi:窗体的扩展样式gwl_exstyle用于setwindowlong

Delphi 老外分享的textfile高速遍历大数据文本

Delphi 获取指定年月的周、日数 -weeksinayear、weeksinyear、daysinayear、daysinamonth、daysinyear、daysinmonth

Delphi异常处理try except语句和try finally语句用法以及区别

Delphi中tlistview控件使用

Delphi firedac 下的 sqlite 创建数据库

Delphi stringgrid 实例4 本例功能: 1、给每个单元格赋值 2、调整当前单元格位置:上下左右;

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



打赏

取消

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

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

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

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

评论

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