{
StrPos example
The following example uses two edit controls and a button
 on a form. When the button is clicked, the text in the
 first edit control is searched for the text in the second
 edit control.
} 
uses SysUtils;
procedure TForm1.Button1Click(Sender TObject);
var
  Location: PChar;
begin
  if StrPos(PChar(Edit1.Text), PChar(Edit2.Text)) <> nil then
    ShowMessage('Substring found')
  else
    ShowMessage('Substring not found');
end; 
