Topic: [Solved] String Manipulation
Hello Dmitry and all MVD fans,
Here is what I am trying to do :
1- Get the code of a web page with HTTPGet (Works fine)
2- Get position of a tag in that code with Pos (Works fine)
3- Delete code from 1st position to position of the tag (does not work).
The error I get is as follows :
What I don't understand is that StartPos given my POS(someting) is an Integer, and that DELETE(String, Integer, Integer) should recognize StartPos as an Integer.
I'm a bit lost
Any idea ?
procedure Form2_Button1_OnClick (Sender: string; var Cancel: boolean);
var
URL : String;
Source : String;
Longueur : String;
StartPos : Integer;
Source2 : String;
begin
URL := Form2.Edit1.Text;
Source := HTTPGet(URL);
Longueur := IntToStr(Length(Source));
Form2.Edit2.Text := Longueur;
StartPos := Pos('<span class="sku_number">',Source);
//Form2.Edit3.Text := IntToStr(StartPos);
Source2 := Delete(Source, 1, StartPos);
Form2.Edit4.Text := Source2;
end;
Thank you in advance and a good day to you all
Cheers
Mathias
Each time I get a divorce, I keep the house
Zaza Gabor