Skip to main content

How to use C# String.Contains equivalent


Is there an equivalent to the C# String.Contains function?

For, example, in SQL I can do the following:

ToLower(nameFile) like "%(restricted)%"


The "like" expression is SQL only. You can use it inside an aggregate or a SQL tool.

Use the function "Index" to search for a string inside the other. If the result is greater than or equal to 0, the string contains the searched string.

For example:

Index(ToLower(nameFile), "(restricted)", startIndex:, searchIndex:, ignoreCase:) >= 0

Something like:

string_contains equivalent2.png

  • Was this article helpful?