Autor Beitrag
alias5000
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2145

WinXP Prof SP2, Ubuntu 9.04
C/C++(Code::Blocks, VS.NET),A51(Keil),Object Pascal(D2005PE, Turbo Delphi Explorer) C# (VS 2008 Express)
BeitragVerfasst: So 06.03.05 13:52 
Ich weiß das Thema kam schonmal, wurde aber nicht beantwortet :oops: ... Jetzt frag ichs halt mal: Würde gerne rausfinden wie ich URLs zerlegen kann. Interessant wären da Dateinamen (-> "..../Package.zip") oder die "Stammadresse" (->"http:\\www.delphi-forum.de") Danke!!!

_________________
Programmers never die, they just GOSUB without RETURN
retnyg
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2754

SNES, GB, GBA, CPC, A500, 486/66, P4/3.0HT: NintendOS, AmigaOS, DoS
Delphi 5, Delphi 7
BeitragVerfasst: So 06.03.05 14:09 
der wichtigste befehl zur zerlegung eines strings ist copy

beispiel: ip-adresse aus url rausholen
ausblenden Delphi-Quelltext
1:
2:
3:
    host := copy(url,pos('://',url)+3,length(url));
    if pos(':',host) > 0 then host := copy(host,1,pos(':',host)-1);
    if pos('/',host) > 0 then host := copy(host,1,pos('/',host)-1);

_________________
es gibt leute, die sind genetisch nicht zum programmieren geschaffen.
in der regel haben diese leute die regel...