Tinderbox v8 Icon

String.containsAnyOf(aSet)


Operator Type: 

Operator Scope of Action: 

Operator Purpose: 

Operator First Added: 

Operator Altered: 

 Function   [other Function type actions]

 List   [operators of similar scope]

 Query Boolean   [other Query Boolean operators]

 8.8.0

 


String.containsAnyOf(aSet)

From v8.8.0, the operator .containsAnyOf(aSet) is true if any of the words in a set of words is contained in the target string. as shown below, the list may have only one entry. For example:

$Text.containsAnyOf(wordsRelatedTo("emulate"));

Will be true if the tested note's $Text contains the word "aspire".

aSet implies using a list of values (ideally with no dupes). This can be a literal list of 1 or more values—as in the example above, or an attribute reference holding a list of values, for instance:

$Text.containsAnyOf($MySet);

Note that .containsAnyOf() is always case-insensitive.