Autor Beitrag
dude
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 48



BeitragVerfasst: Di 04.03.03 13:23 
Hi alle,

gibt es eine Variable, die in einem String einfach irgendetwasw ist?
also, folgendes Beispiel:
ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
var
  a : Irgendwas;
begin

edit1.text := 'Du stinkst nach Fisch';

if edit1.text := a + 'stinkst' + a then
begin
showmessage('Der Text enthält ''stinkst'!');
end;
MathiasSimmack
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Di 04.03.03 14:16 
Ja. Suchfunktion bzw. Delphi-Hilfe mit dem Zauberwort pos füttern.
AndyB
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1173
Erhaltene Danke: 14


RAD Studio XE2
BeitragVerfasst: Di 04.03.03 14:17 
Ich würde es mit Pos() probieren.

ausblenden Quelltext
1:
2:
if Pos('test', Edit1.Text) > 0 then
  ShowMessage('"test" ist in Edit1.Text enthalten');

_________________
Ist Zeit wirklich Geld?
dude Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 48



BeitragVerfasst: Di 04.03.03 18:05 
ok, hat gefunzt !


danke;