How to check if a string contains a substring in Delphi?

You can use the functions in StrUtils in Delphi

uses
  StrUtils;
..
    if ContainsText('A.Sven,G.Jane,Jack', 'Jane') then 
    ...

ContainsText returns true if the subtext is found, without case-sensitivity, in the given text

In StrUtils you’ll also find handy functions like StartsText, EndsText and ReplaceText

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)