String content = "Jane";
String container = 'A.Sven,G.Jane,Jack'; // This is the string which i need to be searched with string content
boolean containerContainsContent = StringUtils.containsIgnoreCase(container, content); // I used to write like this in java
我是Delphi的新手。Delphi中是否有contains
命令或执行相同操作的任何其他命令?
您可以StrUtils
在Delphi中使用这些功能
uses
StrUtils;
..
if ContainsText('A.Sven,G.Jane,Jack', 'Jane') then
...
ContainsText
返回true
是否在给定文本中找到子文本(不区分大小写)
在StrUtils
你还可以找到方便的功能,如StartsText
,EndsText
和ReplaceText
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句