FEEL

contains

FEEL built-in function · FEEL string functions

contains(string, match)

Returns true if the string contains match anywhere, false otherwise.

contains takes a plain string, not a pattern, so a dot is just a dot. To test whether a list contains a value, use list contains instead.

Parameters

ParameterTypeDescription
stringstringthe string to search in
matchstringthe substring to look for

Examples

contains("foobar", "of")
contains("foobar", "oba")

Edge cases and null handling

contains("FooBar", "foo")

Case-sensitive.

contains("a.b", ".")

No regex: the dot is literal.

contains("foobar", "")

Every string contains the empty string.

contains(null, "a")

Null in, null out. B-FEEL returns false.

Related functions

starts with · ends with · matches

Defined by the OMG DMN 1.6 specification, chapter 10.3.4 (built-in functions).