主页 > 编程资料 > Delphi >
发布时间:2015-09-22 作者:网络 阅读:78次

 function GetHost(TheURL: string): String;  var    FURL: String;  begin    FURL := TheURL + '555';    if pos(UpperCase('http://'), UpperCase(FURL)) > 0 then    begin      Delete(FURL, 1, Length('http://'),',',');    end;    Result := Copy(FURL, 1, pos('/', FURL) - 1,',',');  end;
  function GetURI():string;  var    s:String;  begin    S:=GetHost(URL) ;    Result := Copy(URL, pos(s, URL) + Length(s) + 1, MaxInt,',',');  end;

procedure TForm1.Button1Click(Sender: TObject,',',');beginshowmessage(GetHost('http://www.3464.com/tools/'),',',');end;
procedure TForm1.Button2Click(Sender: TObject,',',');beginurl:='http://www.3464.com/tools/index.htm';showmessage(GetURI(),',',');
end;

关键字词: