Saber se uma string esta contida em outra

Delphi

01/02/2008

Existe uma maneira de testar se uma string esta contida dentro de outra, tipo o codigo ai em baixo. Sem ter que fazer um loop na string;

    if xT   "esta contido"   xEst)  then
    begin
        .
        .
    end;



Claudio_f

Claudio_f

Curtidas 0

Respostas

Rjun

Rjun

01/02/2008

Utilize a função POS.


GOSTEI 0
Steve_narancic

Steve_narancic

01/02/2008

if pos(´casa´, ´s´) > 0 then
begin

end;


GOSTEI 0
POSTAR