Scroll

Custom Function: String contains

This custom function returns True if a string is contained within another. Otherwise it returns False. This may be useful to classify strings based on words or characters they contain.

Arguments (Min - Max): 2 - 2

Usage

Contains(x, y)

  • x is the string value to search through
  • y is the string value to search for

Code

string textToSearch = args[0].ToString().ToLower();
string textToFind = args[1].ToString().ToLower();
return textToSearch.Contains(textToFind);

Hidden Article Information

Article Author
Nicole
created 2016-06-03 22:02:51 UTC
updated 2017-06-20 14:17:27 UTC

Labels
functions, contains, example, custom function, search, find,
Have more questions? Submit a request