function IsIn( Substring, StringToSearch: string ): boolean;
begin
   result := Pos( SubString, StringToSearch ) > 0;

   // if you want it to be case in-sensitive then
   //result := Pos( UpperCase( SubString ) , UpperCase( StringToSearch )
) > 0;
end;

 

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of M Tuttle
Sent: Thursday, November 03, 2005 11:45 AM
To: Delphi-Talk Discussion List
Subject: Re: Need 2 equivilent FoxPro function for Delphi

Thanks James, I had just finished doing just that.

> you could create your own function using the pos function. The pos
> function returns the position of one string in another string.  If the
> string is not found it returns zero. 
> 
> James I'm using Delphi 5.  It does not seem to have a AnsiContainsStr.
> Any
> other ideas?
> 
> > You could use the AnsiContainsStr for the first issue.


__________________________________________________
Delphi-Talk mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi-talk
__________________________________________________
Delphi-Talk mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi-talk

Reply via email to