Código Delphi [-] uses StrUtils; function ExtractHostName(const URLStr: string): string; var p1, p2: Integer; begin p1:= Pos('://', URLStr); p2:= PosEx('/', URLStr, p1+3); Result:= Copy(URLStr, p1+3, p2-(p1+3)); end;
uses StrUtils; function ExtractHostName(const URLStr: string): string; var p1, p2: Integer; begin p1:= Pos('://', URLStr); p2:= PosEx('/', URLStr, p1+3); Result:= Copy(URLStr, p1+3, p2-(p1+3)); end;