substring before
FEEL built-in function · FEEL string functions
substring before(string, match)
Returns everything before the first occurrence of match; the empty string if match does not occur.
Parameters
| Parameter | Type | Description |
|---|---|---|
| string | string | the source string |
| match | string | the delimiter to search for |
Examples
substring before("foobar", "bar")
foo
Try it ↑
substring before("foobar", "xyz")
(empty string)
Try it ↑
Edge cases and null handling
substring before("foobar", "")
(empty string)
Try it ↑
Part of FEEL string functions: the rules all of them share, string concatenation, regex pitfalls and every function side by side.
Related functions
Defined by the OMG DMN 1.6 specification, chapter 10.3.4 (built-in functions).