Autor Beitrag
BigBen4ever
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 98



BeitragVerfasst: So 18.04.04 19:53 
Moin eigentlich ganz simple sache ..

ich habe einen string ..(ist eine zeile aus einem quelltext) ...den habe ich als variable "link" festgelegt ..

nun möchte ich diesen string prüfen, ob der einen bestimmten string enthält , den ich als "gesucht" festgelegt hab ..

wie mache ich das?

also als beispiel:

..
link:=edit2.Text;
gesucht:='bio.php?char=hundemann';

wie würde ich jez prüfen ob der gesucht string irgendwo im "link" string enthalten ist?
obbschtkuche
Gast
Erhaltene Danke: 1



BeitragVerfasst: So 18.04.04 19:55 
ausblenden Delphi-Quelltext
1:
pos(gesucht, link) > 0					
BigBen4ever Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 98



BeitragVerfasst: So 18.04.04 19:55 
axo am liebsten würde ich das dann in ner if-abfrage haben mit einer true,false aussage ..also wenn das enthalten ist, dann ..

wenn nicht dann ...

wäre über quelltext sehr dankbar..
MartinPb
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 698



BeitragVerfasst: So 18.04.04 19:59 
obbschtkuche hat folgendes geschrieben:
ausblenden Delphi-Quelltext
1:
pos(gesucht, link) > 0					


Das Ergebnis hier ist True oder False. Einfach in IF Abfrage intergrieren.

_________________
Gruß
Martin
BigBen4ever Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 98



BeitragVerfasst: So 18.04.04 20:01 
ok vielen dank