procedure TForm1.Button1Click(Sender: TObject);
var ss:TStringList;
begin
ss:=TStringList.Create;
ss.Add('ABC');
ss.Add('XPS');
if ss.IndexOf('AAA')>-1 then
ShowMessage('HaveAAA');
if ss.IndexOf('ABC')>-1 then //若返回的值大于-1,说明有.
ShowMessage('HaveABC');
end;