Autor Beitrag
SebastianWe
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 44

Win XP Pro
Delphi 7
BeitragVerfasst: Mi 02.06.04 13:39 
Hi,

ich möchte eine Stelle aus einer HTML Datei auslesen. (HTML Seite habe ich mit Indy in einen String gemacht)
Dazu habe ich schon mit POS Anfangs und Endstelle herausgefunden.
Jetzt möchte ich alles was zwischen den beiden Stellen steht als Variable speichern. Ich hab da sowas mit Copy gelesen, wurde aber nicht weiter fündig.
Wie geht das?
mk2
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 72

WIN 2000
D4 Prof
BeitragVerfasst: Mi 02.06.04 13:44 
Hi,

die copy funktion sieht so aus:

ausblenden Delphi-Quelltext
1:
function Copy(S; Index, Count: Integer): string;					


wenn du anfangs- und endstelle kennst gehts so:

ausblenden Delphi-Quelltext
1:
teilstring:=Copy(S,anfang,ende-anfang+1);					


Bsp: Anfangsstele ist position 4, Ende ist Position 6, dann mußt du von Position 4 an 3 (d.h. 6-4+1) Zeichen rauskopieren.

MfG mk2
Christian S.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 20451
Erhaltene Danke: 2264

Win 10
C# (VS 2019)
BeitragVerfasst: Mi 02.06.04 13:46 
Zitat:
wurde aber nicht weiter fündig.
?? Die Delphi-Hilfe sollte da aber was hergeben!

_________________
Zwei Worte werden Dir im Leben viele Türen öffnen - "ziehen" und "drücken".