-
Notifications
You must be signed in to change notification settings - Fork 53
Open
Labels
Description
Is your feature request related to a problem? Please describe.
FEEL supports string concatenation using the + operator. For short strings, this is easy and sufficient. But it gets messy for bigger strings or string templating.
Other languages (e.g. Scala, Kotlin, etc.) support string interpolation for this case. Common syntax:
// Scala
s"Hello $name"
// Kotlin
"Hello $name"
Or, for more complex expressions:
// Scala
s"Hello ${name.forename}"
// Kotlin
"Hello ${name.forename}"
Describe the solution you'd like
Provide a new built-in function for strings to support a simple form of string interpolation.
- function name:
string template() - arguments:
template: string- the template as a string with$<variable name>as placeholders
- result:
string- evaluated template that contains the variable value instead of the placeholdersnull- if a variable is not present or the template is invalid
Example:
string template("Hello $name")
// "Hello world"
string template("The score of $name is $score.")
// "The score of Jon is 78."
Related issues
- Camunda BPM:
- Zeebe broker:
Related conversation
Related to camunda/camunda-modeler#5202