substring

FEEL built-in function · String functions

substring(string, start position, length?)

Returns the part of the string that starts at start position. Without length, it runs to the end of the string; a negative start position counts backwards from the end.

Parameters

ParameterTypeDescription
stringstringthe source string
start positionnumber1-based start; negative counts from the end
lengthnumbermaximum characters to return (optional)

Examples

substring("foobar", 3)
substring("foobar", 3, 3)
substring("foobar", -2, 1)

Related functions

substring before · substring after · string length

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