Autor Beitrag
PheliX
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 59



BeitragVerfasst: Sa 07.06.03 11:01 
Salut!

Gibts einen Befehl mit dem man aus einem String in der Form:
ausblenden Quelltext
1:
www.homepage.de/ordner/bild.jpg					

in einen Dateinamen
ausblenden Quelltext
1:
bild.jpg					

umwandeln kann?

Schon mal danke! :D
toms
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1099
Erhaltene Danke: 2



BeitragVerfasst: Sa 07.06.03 11:12 
Hi!

Vielleicht so:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
function ExtractFileFromURL(const URL: string): string;
var
  i: Integer;
begin
  i := LastDelimiter('/', URL);
  Result := Copy(URL, i + 1,Length(URL) - i); 
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
  Caption := ExtractFileFromURL('www.homepage.de/ordner/bild.jpg'); // bild.jpg
end;
PheliX Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 59



BeitragVerfasst: Sa 07.06.03 18:16 
Hmm Fett!

Danke!! :D