Ver Mensaje Individual
  #2  
Antiguo 19-10-2006
Avatar de Héctor Randolph
[Héctor Randolph] Héctor Randolph is offline
Miembro Premium
 
Registrado: dic 2004
Posts: 882
Reputación: 20
Héctor Randolph Va por buen camino
Cita:
Empezado por Manuel
Existira una función en delphi como 'estacontenido' en el ejemplo, o hay que crearla
Hola Manuel, existe una función en la unidad StrUtils, llamada AnsiContainsText que hace precisamente lo que necesitas.

Código Delphi [-]
procedure TForm1.Button1Click(Sender: TObject);
var
  A,B: String;
begin
  A:='JUAN LISTO';
  B:='EN EL BOSQUE JUAN LISTO BUSCABA EL TESORO';

   if AnsiContainsText(B,A) then 
      ShowMessage('Esta en string')
   else 
      ShowMessage('NO esta en string');
end;

Saludos
Responder Con Cita