| 
| Description |  | The AnsiContainsText function looks for a Needle string in a Haystack string, returning true if it finds it. Otherwise false. 
 It is a Case insensitive command.
 |  |  |  | Related commands |  |  |  |  | 
| Example code : A simple example |  | var haystack : AnsiString;
 begin
 haystack := 'The cat sat on the mat';
 
 // Note that AnsiContainsStr is case insensitive
 if AnsiContainsStr(haystack, 'THE')
 then WriteLn('''THE'' was found')
 else WriteLn('''THE'' was not found');
 
 if AnsiContainsStr(haystack, 'the')
 then WriteLn('''the'' was found')
 else WriteLn('''the'' was not found');
 end;
 
 |  
 
| Show full unit code |  | 'THE' was found 'the' was found
 
 |  |