CharInSet doesn't work with non English letters?

前端 未结 5 690
北荒
北荒 2021-02-07 08:32

I have updated an application from Delphi 2007 to Delphi 2010, everything went fine, except one statement that compiled fine but not working which is:

If Edit1.T         


        
5条回答
  •  遥遥无期
    2021-02-07 09:30

    Use TCharHelper.IsInArray as follows:

    if Edit1.Text[1].IsInArray(['S','س']) then 
      ShowMessage('Found')
    else
      ShowMessage('Not Found');
    

提交回复
热议问题