You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, Siddhi execution string does not support string manipulation for the following scenarios.
Let say I have a stringS=" {{prize}} > 100 " and the value of the prize coming from a different stream. Assume that, now the prize is 300. Then I need to get the string S'= "300 > 100"
The next scenario is get the string S' = "300 > 100" and evaluate it. The evaluation of that mathematical expression should return true.
Suggestion
Implement an extension called str: map(STRING, STRING...) and this will return a STRING.
Implement an extension called str: eval(STRING, STRING...) and this will return an Object.
Suggested Labels:
Feature improvement
The text was updated successfully, but these errors were encountered:
According to the discussion of this siddhi-dev mail thread, we are going to implement two functions to cater above requirements.
Update previous str:fillTemplate receive a string and a key-value map. Then replace all key entries with a corresponding value. For example it will receive,
Description:
Problem
Currently, Siddhi execution string does not support string manipulation for the following scenarios.
S=" {{prize}} > 100 "
and the value of the prize coming from a different stream. Assume that, now the prize is 300. Then I need to get the stringS'= "300 > 100"
S' = "300 > 100"
and evaluate it. The evaluation of that mathematical expression should returntrue
.Suggestion
str: map(STRING, STRING...)
and this will return a STRING.str: eval(STRING, STRING...)
and this will return an Object.Suggested Labels:
Feature improvement
The text was updated successfully, but these errors were encountered: