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
| Parameter | Type | Description |
|---|---|---|
| string | string | the source string |
| start position | number | 1-based start; negative counts from the end |
| length | number | maximum characters to return (optional) |
Examples
substring("foobar", 3)
obar
Try it →
substring("foobar", 3, 3)
oba
Try it →
substring("foobar", -2, 1)
a
Try it →
Related functions
substring before · substring after · string length
Defined by the OMG DMN 1.6 specification, chapter 10.3.4 (built-in functions).